| 1 | use craterust-analyzer cargo schemars 1.2.2 crate/::preluderust-analyzer cargo schemars 1.2.2 prelude/::*; |
| 2 | use pretty_assertionsrust-analyzer cargo pretty_assertions 1.4.1 crate/::assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!; |
| 3 | 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#; |
| 4 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#; |
| 5 | |
| 6 | #[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:)] |
| 7 | struct UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#; |
| 8 | |
| 9 | #[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:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 10 | struct Structrust-analyzer cargo schemars 1.2.2 enums/Struct# { |
| 11 | foorust-analyzer cargo schemars 1.2.2 enums/Struct#foo.: i32, |
| 12 | barrust-analyzer cargo schemars 1.2.2 enums/Struct#bar.: bool, |
| 13 | } |
| 14 | |
| 15 | #[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:)] |
| 16 | #[serde(rename_all = "camelCase")] |
| 17 | enum Externalrust-analyzer cargo schemars 1.2.2 enums/External# { |
| 18 | UnitOnerust-analyzer cargo schemars 1.2.2 enums/External#UnitOne#, |
| 19 | StringMaprust-analyzer cargo schemars 1.2.2 enums/External#StringMap#(BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>), |
| 20 | UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/External#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 21 | StructNewTyperust-analyzer cargo schemars 1.2.2 enums/External#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct#), |
| 22 | Structrust-analyzer cargo schemars 1.2.2 enums/External#Struct# { |
| 23 | foorust-analyzer cargo schemars 1.2.2 enums/External#Struct#foo.: i32, |
| 24 | barrust-analyzer cargo schemars 1.2.2 enums/External#Struct#bar.: bool, |
| 25 | }, |
| 26 | EmptyTuplerust-analyzer cargo schemars 1.2.2 enums/External#EmptyTuple#(), |
| 27 | Tuplerust-analyzer cargo schemars 1.2.2 enums/External#Tuple#(i32, bool), |
| 28 | UnitTworust-analyzer cargo schemars 1.2.2 enums/External#UnitTwo#, |
| 29 | #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(with = "unit_variant_as_u64")] |
| 30 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(with = "u64")] |
| 31 | UnitAsIntrust-analyzer cargo schemars 1.2.2 enums/External#UnitAsInt#, |
| 32 | #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(with = "tuple_variant_as_str")] |
| 33 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(schema_with = "tuple_variant_as_str::json_schema")] |
| 34 | TupleAsStrrust-analyzer cargo schemars 1.2.2 enums/External#TupleAsStr#(i32, bool), |
| 35 | } |
| 36 | |
| 37 | impl Externalrust-analyzer cargo schemars 1.2.2 enums/External# { |
| 38 | fn valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[External]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/impl#[External]> { |
| 39 | [ |
| 40 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::UnitOnerust-analyzer cargo schemars 1.2.2 enums/External#UnitOne#, |
| 41 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::StringMaprust-analyzer cargo schemars 1.2.2 enums/External#StringMap#( |
| 42 | [("hello".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().(), "world".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().())] |
| 43 | .into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/iter/impl#[`[T; N]`][IntoIterator]into_iter().() |
| 44 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(), |
| 45 | ), |
| 46 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/External#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 47 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::StructNewTyperust-analyzer cargo schemars 1.2.2 enums/External#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct# { |
| 48 | foorust-analyzer cargo schemars 1.2.2 enums/Struct#foo.: 123, |
| 49 | barrust-analyzer cargo schemars 1.2.2 enums/Struct#bar.: true, |
| 50 | }), |
| 51 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::Structrust-analyzer cargo schemars 1.2.2 enums/External#Struct# { |
| 52 | foorust-analyzer cargo schemars 1.2.2 enums/External#Struct#foo.: 123, |
| 53 | barrust-analyzer cargo schemars 1.2.2 enums/External#Struct#bar.: true, |
| 54 | }, |
| 55 | // Ignored due to https://github.com/serde-rs/json/issues/1084 |
| 56 | // Self::EmptyTuple(), |
| 57 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::Tuplerust-analyzer cargo schemars 1.2.2 enums/External#Tuple#(456, false), |
| 58 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::UnitTworust-analyzer cargo schemars 1.2.2 enums/External#UnitTwo#, |
| 59 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::UnitAsIntrust-analyzer cargo schemars 1.2.2 enums/External#UnitAsInt#, |
| 60 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[External]::TupleAsStrrust-analyzer cargo schemars 1.2.2 enums/External#TupleAsStr#(789, true), |
| 61 | ] |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | #[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:)] |
| 66 | #[serde(tag = "tag")] |
| 67 | enum Internalrust-analyzer cargo schemars 1.2.2 enums/Internal# { |
| 68 | UnitOnerust-analyzer cargo schemars 1.2.2 enums/Internal#UnitOne#, |
| 69 | StringMaprust-analyzer cargo schemars 1.2.2 enums/Internal#StringMap#(BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>), |
| 70 | UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/Internal#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 71 | StructNewTyperust-analyzer cargo schemars 1.2.2 enums/Internal#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct#), |
| 72 | Structrust-analyzer cargo schemars 1.2.2 enums/Internal#Struct# { foorust-analyzer cargo schemars 1.2.2 enums/Internal#Struct#foo.: i32, barrust-analyzer cargo schemars 1.2.2 enums/Internal#Struct#bar.: bool }, |
| 73 | // Internally-tagged enums don't support tuple variants |
| 74 | // EmptyTuple(), |
| 75 | // Tuple(i32, bool), |
| 76 | UnitTworust-analyzer cargo schemars 1.2.2 enums/Internal#UnitTwo#, |
| 77 | // Internally-tagged enum variants don't support non-object "payloads" |
| 78 | // #[serde(with = "unit_variant_as_u64")] |
| 79 | // #[schemars(with = "u64")] |
| 80 | // UnitAsInt, |
| 81 | // Internally-tagged enums don't support tuple variants |
| 82 | // #[serde(with = "tuple_variant_as_str")] |
| 83 | // #[schemars(schema_with = "tuple_variant_as_str::json_schema")] |
| 84 | // TupleAsStr(i32, bool), |
| 85 | } |
| 86 | |
| 87 | impl Internalrust-analyzer cargo schemars 1.2.2 enums/Internal# { |
| 88 | fn valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]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/impl#[Internal]> { |
| 89 | [ |
| 90 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]::UnitOnerust-analyzer cargo schemars 1.2.2 enums/Internal#UnitOne#, |
| 91 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]::StringMaprust-analyzer cargo schemars 1.2.2 enums/Internal#StringMap#( |
| 92 | [("hello".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().(), "world".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().())] |
| 93 | .into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/iter/impl#[`[T; N]`][IntoIterator]into_iter().() |
| 94 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(), |
| 95 | ), |
| 96 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]::UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/Internal#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 97 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]::StructNewTyperust-analyzer cargo schemars 1.2.2 enums/Internal#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct# { |
| 98 | foorust-analyzer cargo schemars 1.2.2 enums/Struct#foo.: 123, |
| 99 | barrust-analyzer cargo schemars 1.2.2 enums/Struct#bar.: true, |
| 100 | }), |
| 101 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]::Structrust-analyzer cargo schemars 1.2.2 enums/Internal#Struct# { |
| 102 | foorust-analyzer cargo schemars 1.2.2 enums/Internal#Struct#foo.: 123, |
| 103 | barrust-analyzer cargo schemars 1.2.2 enums/Internal#Struct#bar.: true, |
| 104 | }, |
| 105 | // Self::EmptyTuple(), |
| 106 | // Self::Tuple(456, false), |
| 107 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]::UnitTworust-analyzer cargo schemars 1.2.2 enums/Internal#UnitTwo#, |
| 108 | // Self::UnitAsInt, |
| 109 | // Self::TupleAsStr(789, true), |
| 110 | ] |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | #[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:)] |
| 115 | #[serde(tag = "tag", content = "content")] |
| 116 | enum Adjacentrust-analyzer cargo schemars 1.2.2 enums/Adjacent# { |
| 117 | UnitOnerust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitOne#, |
| 118 | StringMaprust-analyzer cargo schemars 1.2.2 enums/Adjacent#StringMap#(BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>), |
| 119 | UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 120 | StructNewTyperust-analyzer cargo schemars 1.2.2 enums/Adjacent#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct#), |
| 121 | Structrust-analyzer cargo schemars 1.2.2 enums/Adjacent#Struct# { |
| 122 | foorust-analyzer cargo schemars 1.2.2 enums/Adjacent#Struct#foo.: i32, |
| 123 | barrust-analyzer cargo schemars 1.2.2 enums/Adjacent#Struct#bar.: bool, |
| 124 | }, |
| 125 | EmptyTuplerust-analyzer cargo schemars 1.2.2 enums/Adjacent#EmptyTuple#(), |
| 126 | Tuplerust-analyzer cargo schemars 1.2.2 enums/Adjacent#Tuple#(i32, bool), |
| 127 | UnitTworust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitTwo#, |
| 128 | #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(with = "unit_variant_as_u64")] |
| 129 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(with = "u64")] |
| 130 | UnitAsIntrust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitAsInt#, |
| 131 | #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(with = "tuple_variant_as_str")] |
| 132 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(schema_with = "tuple_variant_as_str::json_schema")] |
| 133 | TupleAsStrrust-analyzer cargo schemars 1.2.2 enums/Adjacent#TupleAsStr#(i32, bool), |
| 134 | } |
| 135 | |
| 136 | impl Adjacentrust-analyzer cargo schemars 1.2.2 enums/Adjacent# { |
| 137 | fn valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]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/impl#[Adjacent]> { |
| 138 | [ |
| 139 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::UnitOnerust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitOne#, |
| 140 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::StringMaprust-analyzer cargo schemars 1.2.2 enums/Adjacent#StringMap#( |
| 141 | [("hello".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().(), "world".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().())] |
| 142 | .into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/iter/impl#[`[T; N]`][IntoIterator]into_iter().() |
| 143 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(), |
| 144 | ), |
| 145 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 146 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::StructNewTyperust-analyzer cargo schemars 1.2.2 enums/Adjacent#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct# { |
| 147 | foorust-analyzer cargo schemars 1.2.2 enums/Struct#foo.: 123, |
| 148 | barrust-analyzer cargo schemars 1.2.2 enums/Struct#bar.: true, |
| 149 | }), |
| 150 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::Structrust-analyzer cargo schemars 1.2.2 enums/Adjacent#Struct# { |
| 151 | foorust-analyzer cargo schemars 1.2.2 enums/Adjacent#Struct#foo.: 123, |
| 152 | barrust-analyzer cargo schemars 1.2.2 enums/Adjacent#Struct#bar.: true, |
| 153 | }, |
| 154 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::EmptyTuplerust-analyzer cargo schemars 1.2.2 enums/Adjacent#EmptyTuple#(), |
| 155 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::Tuplerust-analyzer cargo schemars 1.2.2 enums/Adjacent#Tuple#(456, false), |
| 156 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::UnitTworust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitTwo#, |
| 157 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::UnitAsIntrust-analyzer cargo schemars 1.2.2 enums/Adjacent#UnitAsInt#, |
| 158 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]::TupleAsStrrust-analyzer cargo schemars 1.2.2 enums/Adjacent#TupleAsStr#(789, true), |
| 159 | ] |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | #[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:)] |
| 164 | #[serde(untagged)] |
| 165 | enum Untaggedrust-analyzer cargo schemars 1.2.2 enums/Untagged# { |
| 166 | UnitOnerust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitOne#, |
| 167 | StringMaprust-analyzer cargo schemars 1.2.2 enums/Untagged#StringMap#(BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>), |
| 168 | UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 169 | StructNewTyperust-analyzer cargo schemars 1.2.2 enums/Untagged#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct#), |
| 170 | Structrust-analyzer cargo schemars 1.2.2 enums/Untagged#Struct# { |
| 171 | foorust-analyzer cargo schemars 1.2.2 enums/Untagged#Struct#foo.: i32, |
| 172 | barrust-analyzer cargo schemars 1.2.2 enums/Untagged#Struct#bar.: bool, |
| 173 | }, |
| 174 | EmptyTuplerust-analyzer cargo schemars 1.2.2 enums/Untagged#EmptyTuple#(), |
| 175 | Tuplerust-analyzer cargo schemars 1.2.2 enums/Untagged#Tuple#(i32, bool), |
| 176 | UnitTworust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitTwo#, |
| 177 | #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(with = "unit_variant_as_u64")] |
| 178 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(with = "u64")] |
| 179 | UnitAsIntrust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitAsInt#, |
| 180 | #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(with = "tuple_variant_as_str")] |
| 181 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(schema_with = "tuple_variant_as_str::json_schema")] |
| 182 | TupleAsStrrust-analyzer cargo schemars 1.2.2 enums/Untagged#TupleAsStr#(i32, bool), |
| 183 | } |
| 184 | |
| 185 | impl Untaggedrust-analyzer cargo schemars 1.2.2 enums/Untagged# { |
| 186 | fn valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]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/impl#[Untagged]> { |
| 187 | [ |
| 188 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::UnitOnerust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitOne#, |
| 189 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::StringMaprust-analyzer cargo schemars 1.2.2 enums/Untagged#StringMap#( |
| 190 | [("hello".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().(), "world".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().())] |
| 191 | .into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/iter/impl#[`[T; N]`][IntoIterator]into_iter().() |
| 192 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(), |
| 193 | ), |
| 194 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::UnitStructNewTyperust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitStructNewType#(UnitStructrust-analyzer cargo schemars 1.2.2 enums/UnitStruct#), |
| 195 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::StructNewTyperust-analyzer cargo schemars 1.2.2 enums/Untagged#StructNewType#(Structrust-analyzer cargo schemars 1.2.2 enums/Struct# { |
| 196 | foorust-analyzer cargo schemars 1.2.2 enums/Struct#foo.: 123, |
| 197 | barrust-analyzer cargo schemars 1.2.2 enums/Struct#bar.: true, |
| 198 | }), |
| 199 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::Structrust-analyzer cargo schemars 1.2.2 enums/Untagged#Struct# { |
| 200 | foorust-analyzer cargo schemars 1.2.2 enums/Untagged#Struct#foo.: 123, |
| 201 | barrust-analyzer cargo schemars 1.2.2 enums/Untagged#Struct#bar.: true, |
| 202 | }, |
| 203 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::EmptyTuplerust-analyzer cargo schemars 1.2.2 enums/Untagged#EmptyTuple#(), |
| 204 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::Tuplerust-analyzer cargo schemars 1.2.2 enums/Untagged#Tuple#(456, false), |
| 205 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::UnitTworust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitTwo#, |
| 206 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::UnitAsIntrust-analyzer cargo schemars 1.2.2 enums/Untagged#UnitAsInt#, |
| 207 | Selfrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]::TupleAsStrrust-analyzer cargo schemars 1.2.2 enums/Untagged#TupleAsStr#(789, true), |
| 208 | ] |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | mod unit_variant_as_u64rust-analyzer cargo schemars 1.2.2 enums/unit_variant_as_u64/ { |
| 213 | pub(superrust-analyzer cargo schemars 1.2.2 enums/) fn serializerust-analyzer cargo schemars 1.2.2 enums/unit_variant_as_u64/serialize().<S>(ser: S) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<S::Okrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Ok#, S::Errorrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Error#> |
| 214 | where |
| 215 | S: serderust-analyzer cargo serde 1.0.229 crate/::Serializerrust-analyzer cargo serde_core 1.0.229 ser/Serializer#, |
| 216 | { |
| 217 | ser.serialize_u64rust-analyzer cargo serde_core 1.0.229 ser/Serializer#serialize_u64().(42) |
| 218 | } |
| 219 | |
| 220 | pub(superrust-analyzer cargo schemars 1.2.2 enums/) fn deserializerust-analyzer cargo schemars 1.2.2 enums/unit_variant_as_u64/deserialize().<'de, D>(deser: D) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), D::Errorrust-analyzer cargo serde_core 1.0.229 de/Deserializer#Error#> |
| 221 | where |
| 222 | D: serderust-analyzer cargo serde 1.0.229 crate/::Deserializerrust-analyzer cargo serde_core 1.0.229 de/Deserializer#<'de>, |
| 223 | { |
| 224 | use serderust-analyzer cargo serde 1.0.229 crate/::derust-analyzer cargo serde_core 1.0.229 de/::Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#; |
| 225 | |
| 226 | u64::deserializerust-analyzer cargo serde_core 1.0.229 de/impls/impl#[u64][`Deserialize<'de>`]deserialize().(deser).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(|_| ()) |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | mod tuple_variant_as_strrust-analyzer cargo schemars 1.2.2 enums/tuple_variant_as_str/ { |
| 231 | pub(superrust-analyzer cargo schemars 1.2.2 enums/) fn serializerust-analyzer cargo schemars 1.2.2 enums/tuple_variant_as_str/serialize().<S>(i: &i32, b: &bool, ser: S) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<S::Okrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Ok#, S::Errorrust-analyzer cargo serde_core 1.0.229 ser/Serializer#Error#> |
| 232 | where |
| 233 | S: serderust-analyzer cargo serde 1.0.229 crate/::Serializerrust-analyzer cargo serde_core 1.0.229 ser/Serializer#, |
| 234 | { |
| 235 | ser.collect_strrust-analyzer cargo serde_core 1.0.229 ser/Serializer#collect_str().(&format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("{i} {b}")) |
| 236 | } |
| 237 | |
| 238 | pub(superrust-analyzer cargo schemars 1.2.2 enums/) fn deserializerust-analyzer cargo schemars 1.2.2 enums/tuple_variant_as_str/deserialize().<'de, D>(deser: D) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(i32, bool), D::Errorrust-analyzer cargo serde_core 1.0.229 de/Deserializer#Error#> |
| 239 | where |
| 240 | D: serderust-analyzer cargo serde 1.0.229 crate/::Deserializerrust-analyzer cargo serde_core 1.0.229 de/Deserializer#<'de>, |
| 241 | { |
| 242 | use serderust-analyzer cargo serde 1.0.229 crate/::derust-analyzer cargo serde_core 1.0.229 de/::{Deserializerust-analyzer cargo serde_core 1.0.229 de/Deserialize#, Errorrust-analyzer cargo serde_core 1.0.229 de/Error#}; |
| 243 | let error = || Errorrust-analyzer cargo serde_core 1.0.229 de/Error#::customrust-analyzer cargo serde_core 1.0.229 de/Error#custom().("invalid string"); |
| 244 | |
| 245 | let (i, b) = <&str>::deserializerust-analyzer cargo serde_core 1.0.229 de/impls/impl#[`&'a str`][`Deserialize<'de>`]deserialize().(deser)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). |
| 246 | .split_oncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]split_once().(' ') |
| 247 | .ok_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or_else().(error)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch().; |
| 248 | |
| 249 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(( |
| 250 | i.parserust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]parse().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| error())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch()., |
| 251 | b.parserust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]parse().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| error())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/try_trait/Try#branch()., |
| 252 | )) |
| 253 | } |
| 254 | |
| 255 | pub(superrust-analyzer cargo schemars 1.2.2 enums/) fn json_schemarust-analyzer cargo schemars 1.2.2 enums/tuple_variant_as_str/json_schema().(_: &mut schemarsrust-analyzer cargo schemars 1.2.2 crate/::SchemaGeneratorrust-analyzer cargo schemars 1.2.2 generate/SchemaGenerator#) -> schemarsrust-analyzer cargo schemars 1.2.2 crate/::Schemarust-analyzer cargo schemars 1.2.2 schema/Schema# { |
| 256 | schemarsrust-analyzer cargo schemars 1.2.2 crate/::json_schemarust-analyzer cargo schemars 1.2.2 macros/json_schema!!({ |
| 257 | "type": "string", |
| 258 | "pattern": r"^\d+ (true|false)$" |
| 259 | }) |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 264 | fn externally_tagged_enumrust-analyzer cargo schemars 1.2.2 enums/externally_tagged_enum().() { |
| 265 | testrust-analyzer cargo schemars 1.2.2 test!!(Externalrust-analyzer cargo schemars 1.2.2 enums/External#) |
| 266 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 267 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(Externalrust-analyzer cargo schemars 1.2.2 enums/External#::valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[External]values().()) |
| 268 | .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().()); |
| 269 | } |
| 270 | |
| 271 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 272 | fn internally_tagged_enumrust-analyzer cargo schemars 1.2.2 enums/internally_tagged_enum().() { |
| 273 | testrust-analyzer cargo schemars 1.2.2 test!!(Internalrust-analyzer cargo schemars 1.2.2 enums/Internal#) |
| 274 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 275 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(Internalrust-analyzer cargo schemars 1.2.2 enums/Internal#::valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[Internal]values().()) |
| 276 | .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().()); |
| 277 | } |
| 278 | |
| 279 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 280 | fn adjacently_tagged_enumrust-analyzer cargo schemars 1.2.2 enums/adjacently_tagged_enum().() { |
| 281 | testrust-analyzer cargo schemars 1.2.2 test!!(Adjacentrust-analyzer cargo schemars 1.2.2 enums/Adjacent#) |
| 282 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 283 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(Adjacentrust-analyzer cargo schemars 1.2.2 enums/Adjacent#::valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[Adjacent]values().()) |
| 284 | .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().()); |
| 285 | } |
| 286 | |
| 287 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 288 | fn untagged_enumrust-analyzer cargo schemars 1.2.2 enums/untagged_enum().() { |
| 289 | testrust-analyzer cargo schemars 1.2.2 test!!(Untaggedrust-analyzer cargo schemars 1.2.2 enums/Untagged#) |
| 290 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 291 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(Untaggedrust-analyzer cargo schemars 1.2.2 enums/Untagged#::valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]values().()) |
| 292 | .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().()); |
| 293 | } |
| 294 | |
| 295 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 296 | fn untagged_enum_with_titlesrust-analyzer cargo schemars 1.2.2 enums/untagged_enum_with_titles().() { |
| 297 | testrust-analyzer cargo schemars 1.2.2 test!!( |
| 298 | Untaggedrust-analyzer cargo schemars 1.2.2 enums/Untagged#, |
| 299 | SchemaSettingsrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#::defaultrust-analyzer cargo schemars 1.2.2 generate/impl#[SchemaSettings][Default]default().().withrust-analyzer cargo schemars 1.2.2 generate/impl#[SchemaSettings]with().(|s| s.untagged_enum_variant_titlesrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#untagged_enum_variant_titles. = true) |
| 300 | ) |
| 301 | .customrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]custom().(|s, _| { |
| 302 | assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!( |
| 303 | s.pointerrust-analyzer cargo schemars 1.2.2 schema/impl#[Schema]pointer().("/anyOf/0/title").and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(Valuerust-analyzer cargo serde_json 1.0.151 value/Value#::as_strrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]as_str().), |
| 304 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("UnitOne") |
| 305 | ); |
| 306 | for variant in s.pointerrust-analyzer cargo schemars 1.2.2 schema/impl#[Schema]pointer().("/anyOf").and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(Valuerust-analyzer cargo serde_json 1.0.151 value/Value#::as_arrayrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]as_array().).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() { |
| 307 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(variant.getrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]get().("title").is_some_andrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some_and().(Valuerust-analyzer cargo serde_json 1.0.151 value/Value#::is_stringrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]is_string().)); |
| 308 | } |
| 309 | }) |
| 310 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 311 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().(Untaggedrust-analyzer cargo schemars 1.2.2 enums/Untagged#::valuesrust-analyzer cargo schemars 1.2.2 enums/impl#[Untagged]values().()) |
| 312 | .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().()); |
| 313 | } |
| 314 | |
| 315 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 316 | enum NoVariantsrust-analyzer cargo schemars 1.2.2 enums/NoVariants# {} |
| 317 | |
| 318 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 319 | fn no_variantsrust-analyzer cargo schemars 1.2.2 enums/no_variants().() { |
| 320 | testrust-analyzer cargo schemars 1.2.2 test!!(NoVariantsrust-analyzer cargo schemars 1.2.2 enums/NoVariants#) |
| 321 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 322 | .assert_rejects_derust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_rejects_de().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().()); |
| 323 | } |
| 324 | |
| 325 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:)] |
| 326 | #[serde(rename_all_fields = "UPPERCASE", rename_all = "snake_case")] |
| 327 | enum Renamedrust-analyzer cargo schemars 1.2.2 enums/Renamed# { |
| 328 | StructVariantrust-analyzer cargo schemars 1.2.2 enums/Renamed#StructVariant# { |
| 329 | fieldrust-analyzer cargo schemars 1.2.2 enums/Renamed#StructVariant#field.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 330 | }, |
| 331 | #[serderust-analyzer cargo schemars_derive 1.2.2 serde:(rename = "custom name variant")] |
| 332 | RenamedStructVariantrust-analyzer cargo schemars 1.2.2 enums/Renamed#RenamedStructVariant# { |
| 333 | #[serde(rename = "custom name field")] |
| 334 | fieldrust-analyzer cargo schemars 1.2.2 enums/Renamed#RenamedStructVariant#field.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 335 | }, |
| 336 | } |
| 337 | |
| 338 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 339 | fn renamedrust-analyzer cargo schemars 1.2.2 enums/renamed().() { |
| 340 | testrust-analyzer cargo schemars 1.2.2 test!!(Renamedrust-analyzer cargo schemars 1.2.2 enums/Renamed#) |
| 341 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 342 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().([ |
| 343 | Renamedrust-analyzer cargo schemars 1.2.2 enums/Renamed#::StructVariantrust-analyzer cargo schemars 1.2.2 enums/Renamed#StructVariant# { |
| 344 | fieldrust-analyzer cargo schemars 1.2.2 enums/Renamed#StructVariant#field.: "foo".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().(), |
| 345 | }, |
| 346 | Renamedrust-analyzer cargo schemars 1.2.2 enums/Renamed#::RenamedStructVariantrust-analyzer cargo schemars 1.2.2 enums/Renamed#RenamedStructVariant# { |
| 347 | fieldrust-analyzer cargo schemars 1.2.2 enums/Renamed#RenamedStructVariant#field.: "bar".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().(), |
| 348 | }, |
| 349 | ]) |
| 350 | .assert_rejects_derust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_rejects_de().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().()); |
| 351 | } |
| 352 | |
| 353 | #[allow(dead_code)] |
| 354 | #[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:)] |
| 355 | enum SoundOfMusicrust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic# { |
| 356 | /// # A deer |
| 357 | /// |
| 358 | /// A female deer |
| 359 | Dorust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#Do#, |
| 360 | /// A drop of golden sun |
| 361 | Rerust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#Re#, |
| 362 | /// A name I call myself |
| 363 | Mirust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#Mi#, |
| 364 | } |
| 365 | |
| 366 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 367 | fn unit_variants_with_doc_commentsrust-analyzer cargo schemars 1.2.2 enums/unit_variants_with_doc_comments().() { |
| 368 | testrust-analyzer cargo schemars 1.2.2 test!!(SoundOfMusicrust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#) |
| 369 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 370 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().([SoundOfMusicrust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#::Dorust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#Do#, SoundOfMusicrust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#::Rerust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#Re#, SoundOfMusicrust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#::Mirust-analyzer cargo schemars 1.2.2 enums/SoundOfMusic#Mi#]) |
| 371 | .assert_rejects_derust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_rejects_de().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().()) |
| 372 | .customrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]custom().(|schema, _| { |
| 373 | assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!( |
| 374 | schema.as_valuerust-analyzer cargo schemars 1.2.2 schema/impl#[Schema]as_value().().pointerrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]pointer().("/oneOf/0/title"), |
| 375 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&("A deer".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())), |
| 376 | ); |
| 377 | assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!( |
| 378 | schema.as_valuerust-analyzer cargo schemars 1.2.2 schema/impl#[Schema]as_value().().pointerrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]pointer().("/oneOf/0/description"), |
| 379 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&("A female deer".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())), |
| 380 | ); |
| 381 | assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!( |
| 382 | schema.as_valuerust-analyzer cargo schemars 1.2.2 schema/impl#[Schema]as_value().().pointerrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]pointer().("/oneOf/1/description"), |
| 383 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&("A drop of golden sun".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())), |
| 384 | ); |
| 385 | assert_eqrust-analyzer cargo pretty_assertions 1.4.1 assert_eq!!( |
| 386 | schema.as_valuerust-analyzer cargo schemars 1.2.2 schema/impl#[Schema]as_value().().pointerrust-analyzer cargo serde_json 1.0.151 value/impl#[Value]pointer().("/oneOf/2/description"), |
| 387 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&("A name I call myself".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())), |
| 388 | ); |
| 389 | }); |
| 390 | } |