Debian Codegraph @

tests/integration/enums_option_flattened.rs

raw symbols SCIP
1 use craterust-analyzer cargo schemars 1.2.2 crate/::preluderust-analyzer cargo schemars 1.2.2 prelude/::*;
2 use schemarsrust-analyzer cargo schemars 1.2.2 crate/::generaterust-analyzer cargo schemars 1.2.2 generate/::SchemaSettingsrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#;
3
4 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
5 struct EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct# {}
6
7 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
8 enum External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1# {
9 Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit1#,
10 Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit2#,
11 }
12
13 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
14 enum External2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2# {
15 Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#Unit3#,
16 ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#ValueNewType#(Valuerust-analyzer cargo serde_json 1.0.151 value/Value#),
17 }
18
19 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
20 enum External3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3# {
21 Intrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#Int#(u32),
22 Tuplerust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#Tuple#(u8, bool),
23 }
24
25 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
26 enum External4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4# {
27 StructNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#StructNewType#(EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct#),
28 Structrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct#foo.: i32, barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct#bar.: bool },
29 }
30
31 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
32 struct ExternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer# {
33 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#f.: f32,
34 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
35 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e1.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#>,
36 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
37 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e2.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#>,
38 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
39 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e3.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#>,
40 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
41 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e4.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#>,
42 }
43
44 impl ExternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer# {
45 fn valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainer]values().() -> impl IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#Item# = Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainer]> {
46 [
47 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainer] {
48 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#f.: 1.23,
49 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#::Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit1#),
50 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#::Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#Unit3#),
51 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#::Intrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#Int#(123)),
52 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e4.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#::StructNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#StructNewType#(EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct# {})),
53 },
54 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainer] {
55 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#f.: 9.87,
56 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#::Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit2#),
57 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#::ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#ValueNewType#(jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({"key": "value"}))),
58 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#::Tuplerust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#Tuple#(0, true)),
59 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e4.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#::Structrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct#foo.: 1, barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct#bar.: true }),
60 },
61 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainer] {
62 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#f.: 9.87,
63 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e1.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
64 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e2.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
65 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e3.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
66 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#e4.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
67 },
68 ]
69 }
70 }
71
72 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
73 #[serde(deny_unknown_fields)]
74 struct ExternalContainerDenyUnknownFieldsrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields# {
75 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#f.: f32,
76 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
77 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e1.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#>,
78 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
79 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e2.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#>,
80 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
81 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e3.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#>,
82 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
83 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e4.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#>,
84 }
85
86 impl ExternalContainerDenyUnknownFieldsrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields# {
87 fn valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainerDenyUnknownFields]values().() -> impl IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#Item# = Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainerDenyUnknownFields]> {
88 [
89 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainerDenyUnknownFields] {
90 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#f.: 1.23,
91 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#::Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit1#),
92 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#::Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#Unit3#),
93 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#::Intrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#Int#(123)),
94 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e4.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#::StructNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#StructNewType#(EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct# {})),
95 },
96 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainerDenyUnknownFields] {
97 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#f.: 9.87,
98 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#::Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit2#),
99 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#::ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/External2#ValueNewType#(jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({"key": "value"}))),
100 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#::Tuplerust-analyzer cargo schemars 1.2.2 enums_option_flattened/External3#Tuple#(0, true)),
101 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e4.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#::Structrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct#foo.: 1, barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/External4#Struct#bar.: true }),
102 },
103 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainerDenyUnknownFields] {
104 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#f.: 9.87,
105 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e1.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
106 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e2.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
107 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e3.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
108 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#e4.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
109 },
110 ]
111 }
112 }
113
114 fn external_container_json_with_extra_fieldrust-analyzer cargo schemars 1.2.2 enums_option_flattened/external_container_json_with_extra_field().() -> Valuerust-analyzer cargo serde_json 1.0.151 value/Value# {
115 jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({
116 "f": 1.23,
117 "Unit1": null,
118 "Unit3": null,
119 "Int": 123,
120 "StructNewType": {},
121 "extra": null
122 })
123 }
124
125 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
126 fn external_enums_flattenedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/external_enums_flattened().() {
127 testrust-analyzer cargo schemars 1.2.2 test!!(ExternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#)
128 .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().()
129 .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(ExternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainer#::valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainer]values().())
130 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().())
131 .assert_allows_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_de_roundtrip().([external_container_json_with_extra_fieldrust-analyzer cargo schemars 1.2.2 enums_option_flattened/external_container_json_with_extra_field().()]);
132 }
133
134 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
135 fn external_enums_flattened_deny_unknown_fieldsrust-analyzer cargo schemars 1.2.2 enums_option_flattened/external_enums_flattened_deny_unknown_fields().() {
136 testrust-analyzer cargo schemars 1.2.2 test!!(ExternalContainerDenyUnknownFieldsrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#)
137 .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().()
138 .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(ExternalContainerDenyUnknownFieldsrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#::valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainerDenyUnknownFields]values().())
139 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().())
140 .assert_rejects_derust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_rejects_de().([external_container_json_with_extra_fieldrust-analyzer cargo schemars 1.2.2 enums_option_flattened/external_container_json_with_extra_field().()]);
141 }
142
143 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
144 fn external_enums_flattened_deny_unknown_fields_draft07rust-analyzer cargo schemars 1.2.2 enums_option_flattened/external_enums_flattened_deny_unknown_fields_draft07().() {
145 testrust-analyzer cargo schemars 1.2.2 test!!(
146 ExternalContainerDenyUnknownFieldsrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#,
147 SchemaSettingsrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#::draft07rust-analyzer cargo schemars 1.2.2 generate/impl#[SchemaSettings]draft07().()
148 )
149 .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().()
150 .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(ExternalContainerDenyUnknownFieldsrust-analyzer cargo schemars 1.2.2 enums_option_flattened/ExternalContainerDenyUnknownFields#::valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[ExternalContainerDenyUnknownFields]values().())
151 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().())
152 .assert_rejects_derust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_rejects_de().([external_container_json_with_extra_fieldrust-analyzer cargo schemars 1.2.2 enums_option_flattened/external_container_json_with_extra_field().()]);
153 }
154
155 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
156 #[serde(tag = "tag1")]
157 enum Internal1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1# {
158 Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1#Unit1#,
159 Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1#Unit2#,
160 }
161
162 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
163 #[serde(tag = "tag2")]
164 enum Internal2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2# {
165 Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#Unit3#,
166 ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#ValueNewType#(Valuerust-analyzer cargo serde_json 1.0.151 value/Value#),
167 }
168
169 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
170 #[serde(tag = "tag3")]
171 enum Internal3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3# {
172 StructNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#StructNewType#(EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct#),
173 Structrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#Struct# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#Struct#foo.: i32, barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#Struct#bar.: bool },
174 }
175
176 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
177 struct InternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer# {
178 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#f.: f32,
179 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
180 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e1.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Internal1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1#>,
181 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
182 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e2.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Internal2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#>,
183 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
184 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e3.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Internal3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#>,
185 }
186
187 impl InternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer# {
188 fn valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[InternalContainer]values().() -> impl IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#Item# = Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[InternalContainer]> {
189 [
190 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[InternalContainer] {
191 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#f.: 1.23,
192 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1#::Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1#Unit1#),
193 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#::Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#Unit3#),
194 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#::StructNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#StructNewType#(EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct# {})),
195 },
196 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[InternalContainer] {
197 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#f.: 9.87,
198 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1#::Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal1#Unit2#),
199 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#::ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#ValueNewType#(jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({"key": "value"}))),
200 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#::Structrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#Struct# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#Struct#foo.: 1, barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal3#Struct#bar.: true }),
201 },
202 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[InternalContainer] {
203 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#f.: 9.87,
204 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e1.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
205 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e2.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
206 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#e3.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
207 },
208 ]
209 }
210 }
211
212 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
213 fn internal_enums_flattenedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/internal_enums_flattened().() {
214 testrust-analyzer cargo schemars 1.2.2 test!!(InternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#)
215 .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().()
216 .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(InternalContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/InternalContainer#::valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[InternalContainer]values().())
217 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().());
218 }
219
220 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
221 #[serde(tag = "tag1", content = "content1")]
222 enum Adjacent1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1# {
223 Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1#Unit1#,
224 Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1#Unit2#,
225 }
226
227 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
228 #[serde(tag = "tag2", content = "content2")]
229 enum Adjacent2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2# {
230 Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2#Unit3#,
231 ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2#ValueNewType#(Valuerust-analyzer cargo serde_json 1.0.151 value/Value#),
232 }
233
234 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
235 #[serde(tag = "tag3", content = "content3")]
236 enum Adjacent3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3# {
237 Intrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#Int#(u32),
238 Tuplerust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#Tuple#(u8, bool),
239 }
240
241 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
242 #[serde(tag = "tag4", content = "content4")]
243 enum Adjacent4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4# {
244 StructNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#StructNewType#(EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct#),
245 Structrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#Struct# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#Struct#foo.: i32, barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#Struct#bar.: bool },
246 }
247
248 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
249 struct AdjacentContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer# {
250 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#f.: f32,
251 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
252 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e1.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Adjacent1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1#>,
253 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
254 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e2.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Adjacent2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2#>,
255 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
256 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e3.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Adjacent3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#>,
257 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
258 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e4.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Adjacent4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#>,
259 }
260
261 impl AdjacentContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer# {
262 fn valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[AdjacentContainer]values().() -> impl IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#Item# = Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[AdjacentContainer]> {
263 [
264 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[AdjacentContainer] {
265 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#f.: 1.23,
266 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1#::Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1#Unit1#),
267 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2#::Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2#Unit3#),
268 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#::Intrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#Int#(123)),
269 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e4.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#::StructNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#StructNewType#(EmptyStructrust-analyzer cargo schemars 1.2.2 enums_option_flattened/EmptyStruct# {})),
270 },
271 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[AdjacentContainer] {
272 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#f.: 9.87,
273 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1#::Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent1#Unit2#),
274 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2#::ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent2#ValueNewType#(jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({"key": "value"}))),
275 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#::Tuplerust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#Tuple#(0, true)),
276 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e4.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#::Structrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#Struct# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#Struct#foo.: 1, barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent4#Struct#bar.: true }),
277 },
278 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[AdjacentContainer] {
279 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#f.: 9.87,
280 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e1.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
281 e2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e2.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
282 e3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e3.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
283 e4rust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#e4.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
284 },
285 ]
286 }
287 }
288
289 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
290 fn adjacent_enums_flattenedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/adjacent_enums_flattened().() {
291 testrust-analyzer cargo schemars 1.2.2 test!!(AdjacentContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#)
292 .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().()
293 .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(AdjacentContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/AdjacentContainer#::valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[AdjacentContainer]values().())
294 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().());
295 }
296
297 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
298 #[serde(untagged)]
299 enum Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged# {
300 Struct1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct1# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct1#foo.: i32 },
301 Struct2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct2# { barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct2#bar.: bool },
302 ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#ValueNewType#(Valuerust-analyzer cargo serde_json 1.0.151 value/Value#),
303 }
304
305 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
306 struct UntaggedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer# {
307 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#f.: f32,
308 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
309 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#e1.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#>,
310 }
311
312 impl UntaggedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer# {
313 fn valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[UntaggedContainer]values().() -> impl IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#Item# = Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[UntaggedContainer]> {
314 [
315 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[UntaggedContainer] {
316 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#f.: 1.23,
317 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#::Struct1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct1# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct1#foo.: 1 }),
318 },
319 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[UntaggedContainer] {
320 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#f.: 9.87,
321 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#::Struct2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct2# { barrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct2#bar.: true }),
322 },
323 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[UntaggedContainer] {
324 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#f.: 42.0,
325 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#::ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#ValueNewType#(jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({"key": "value"}))),
326 },
327 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[UntaggedContainer] { frust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#f.: 42.0, e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#e1.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# },
328 ]
329 }
330 }
331
332 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
333 fn untagged_enums_flattenedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/untagged_enums_flattened().() {
334 testrust-analyzer cargo schemars 1.2.2 test!!(UntaggedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#)
335 .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().()
336 .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(UntaggedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/UntaggedContainer#::valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[UntaggedContainer]values().())
337 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().());
338 }
339
340 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)]
341 struct MixedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer# {
342 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#f.: f32,
343 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
344 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#e1.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#>,
345 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
346 i2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#i2.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Internal2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#>,
347 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
348 a3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#a3.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Adjacent3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#>,
349 #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(flatten)]
350 urust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#u.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#>,
351 }
352
353 impl MixedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer# {
354 fn valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[MixedContainer]values().() -> impl IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#Item# = Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[MixedContainer]> {
355 [
356 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[MixedContainer] {
357 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#f.: 1.23,
358 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#::Unit1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit1#),
359 i2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#i2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#::Unit3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#Unit3#),
360 a3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#a3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#::Intrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#Int#(123)),
361 urust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#u.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#::Struct1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct1# { foorust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#Struct1#foo.: 1 }),
362 },
363 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[MixedContainer] {
364 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#f.: 9.87,
365 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#e1.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(External1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#::Unit2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/External1#Unit2#),
366 i2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#i2.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Internal2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#::ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Internal2#ValueNewType#(jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({"key": "value"}))),
367 a3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#a3.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Adjacent3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#::Tuplerust-analyzer cargo schemars 1.2.2 enums_option_flattened/Adjacent3#Tuple#(0, true)),
368 urust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#u.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Untaggedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#::ValueNewTyperust-analyzer cargo schemars 1.2.2 enums_option_flattened/Untagged#ValueNewType#(jsonrust-analyzer cargo serde_json 1.0.151 macros/json!!({"key": "value"}))),
369 },
370 Selfrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[MixedContainer] {
371 frust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#f.: 9.87,
372 e1rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#e1.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
373 i2rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#i2.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
374 a3rust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#a3.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
375 urust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#u.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
376 },
377 ]
378 }
379 }
380
381 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
382 fn mixed_enums_flattenedrust-analyzer cargo schemars 1.2.2 enums_option_flattened/mixed_enums_flattened().() {
383 testrust-analyzer cargo schemars 1.2.2 test!!(MixedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#)
384 .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().()
385 .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(MixedContainerrust-analyzer cargo schemars 1.2.2 enums_option_flattened/MixedContainer#::valuesrust-analyzer cargo schemars 1.2.2 enums_option_flattened/impl#[MixedContainer]values().())
386 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().());
387 }