| 1 | use craterust-analyzer cargo schemars 1.2.2 crate/::preluderust-analyzer cargo schemars 1.2.2 prelude/::*; |
| 2 | |
| 3 | #[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:)] |
| 4 | #[serde(transparent)] |
| 5 | pub struct TransparentStructrust-analyzer cargo schemars 1.2.2 transparent/TransparentStruct# { |
| 6 | innerrust-analyzer cargo schemars 1.2.2 transparent/TransparentStruct#inner.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 7 | } |
| 8 | |
| 9 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 10 | fn transparent_structrust-analyzer cargo schemars 1.2.2 transparent/transparent_struct().() { |
| 11 | testrust-analyzer cargo schemars 1.2.2 test!!(TransparentStructrust-analyzer cargo schemars 1.2.2 transparent/TransparentStruct#) |
| 12 | .assert_identicalrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_identical().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>() |
| 13 | .assert_allows_ser_roundtrip_defaultrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip_default().() |
| 14 | .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().()); |
| 15 | } |
| 16 | |
| 17 | #[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:)] |
| 18 | #[serde(transparent)] |
| 19 | /// A doc comment |
| 20 | pub struct TransparentStructWithDocrust-analyzer cargo schemars 1.2.2 transparent/TransparentStructWithDoc# { |
| 21 | /// Another doc comment (ignored) |
| 22 | innerrust-analyzer cargo schemars 1.2.2 transparent/TransparentStructWithDoc#inner.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 23 | } |
| 24 | |
| 25 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 26 | fn transparent_struct_with_docrust-analyzer cargo schemars 1.2.2 transparent/transparent_struct_with_doc().() { |
| 27 | testrust-analyzer cargo schemars 1.2.2 test!!(TransparentStructWithDocrust-analyzer cargo schemars 1.2.2 transparent/TransparentStructWithDoc#) |
| 28 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 29 | .assert_allows_ser_roundtrip_defaultrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip_default().() |
| 30 | .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().()); |
| 31 | } |
| 32 | |
| 33 | #[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:)] |
| 34 | #[serde(transparent)] |
| 35 | pub struct TransparentNewTyperust-analyzer cargo schemars 1.2.2 transparent/TransparentNewType#(Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#); |
| 36 | |
| 37 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 38 | fn transparent_newtyperust-analyzer cargo schemars 1.2.2 transparent/transparent_newtype().() { |
| 39 | testrust-analyzer cargo schemars 1.2.2 test!!(TransparentNewTyperust-analyzer cargo schemars 1.2.2 transparent/TransparentNewType#) |
| 40 | .assert_identicalrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_identical().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>() |
| 41 | .assert_allows_ser_roundtrip_defaultrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip_default().() |
| 42 | .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().()); |
| 43 | } |
| 44 | |
| 45 | #[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:)] |
| 46 | #[serde(transparent)] |
| 47 | pub struct TransparentNewTypeWithValidationrust-analyzer cargo schemars 1.2.2 transparent/TransparentNewTypeWithValidation#(#[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(length(min = 1))] Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#); |
| 48 | |
| 49 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 50 | fn transparent_newtype_with_validationrust-analyzer cargo schemars 1.2.2 transparent/transparent_newtype_with_validation().() { |
| 51 | testrust-analyzer cargo schemars 1.2.2 test!!(TransparentNewTypeWithValidationrust-analyzer cargo schemars 1.2.2 transparent/TransparentNewTypeWithValidation#) |
| 52 | .with_validatorrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]with_validator().(|v| !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().v.0rust-analyzer cargo schemars 1.2.2 transparent/TransparentNewTypeWithValidation#0..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]is_empty().()) |
| 53 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 54 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().([TransparentNewTypeWithValidationrust-analyzer cargo schemars 1.2.2 transparent/TransparentNewTypeWithValidation#("[email protected]".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())]) |
| 55 | .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().()); |
| 56 | } |