Home
last modified time | relevance | path

Searched refs:Newtype (Results 1 - 14 of 14) sorted by relevance

/third_party/rust/crates/serde/test_suite/tests/
H A Dtest_gen.rs98 Newtype(#[serde(serialize_with = "ser_x", deserialize_with = "de_x")] X), in test_gen()
124 struct Newtype(#[serde(serialize_with = "ser_x", deserialize_with = "de_x")] X); in test_gen() structure names
125 assert::<Newtype>(); in test_gen()
432 Newtype(X),
462 Newtype(X),
487 Newtype(X),
517 Newtype(X),
571 Newtype(&'static str),
672 Newtype(
863 Newtype(i3
[all...]
H A Dtest_macros.rs441 Newtype(GenericNewTypeStruct<u32>), in test_untagged_newtype_struct()
446 &E::Newtype(GenericNewTypeStruct(5u32)), in test_untagged_newtype_struct()
461 Newtype(GenericNewTypeStruct<u32>), in test_adjacently_tagged_newtype_struct()
466 &E::Newtype(GenericNewTypeStruct(5u32)), in test_adjacently_tagged_newtype_struct()
477 variant: "Newtype", in test_adjacently_tagged_newtype_struct()
685 struct Newtype(BTreeMap<String, String>); in test_internally_tagged_enum() structure names
698 D(Newtype), in test_internally_tagged_enum()
767 &InternallyTagged::D(Newtype(BTreeMap::new())), in test_internally_tagged_enum()
1152 Newtype(T), in test_adjacently_tagged_enum()
1256 &AdjacentlyTagged::Newtype in test_adjacently_tagged_enum()
[all...]
H A Dtest_ignored_any.rs14 Newtype(i32),
91 Target::Newtype(10), in test_deserialize_enum()
92 Target::deserialize(Enum("Newtype")).unwrap() in test_deserialize_enum()
105 IgnoredAny::deserialize(Enum("Newtype")).unwrap(); in test_deserialize_enum()
H A Dtest_annotations.rs1169 Newtype(i32),
1240 &WithVariant::Newtype(123), in test_serialize_with_variant()
1244 variant: "Newtype", in test_serialize_with_variant()
1290 &WithVariant::Newtype(123), in test_deserialize_with_variant()
1294 variant: "Newtype", in test_deserialize_with_variant()
2732 struct Newtype(bool); in test_expecting_message() structure names
2752 assert_de_tokens_error::<Newtype>( in test_expecting_message()
2753 &[Token::Str("Newtype")], in test_expecting_message()
2754 r#"invalid type: string "Newtype", expected something strange..."#, in test_expecting_message()
2915 Newtype(HashMa
[all...]
/third_party/rust/crates/serde/test_suite/no_std/src/
H A Dmain.rs29 struct Newtype(u8); structure names
42 Newtype(u8),
/third_party/rust/crates/serde/serde_derive/src/
H A Dpretend.rs67 Data::Struct(Style::Struct | Style::Tuple | Style::Newtype, fields) => { in pretend_fields_used()
118 Style::Struct | Style::Tuple | Style::Newtype => { in pretend_fields_used_enum()
170 Style::Tuple | Style::Newtype => quote!(( #(#placeholders),* )), in pretend_variants_used()
H A Dser.rs178 Data::Struct(Style::Newtype, fields) => { in serialize_body()
445 Style::Newtype | Style::Tuple => quote!((..)), in serialize_variant()
459 Style::Newtype => { in serialize_variant()
540 Style::Newtype => { in serialize_externally_tagged_variant()
616 Style::Newtype => { in serialize_internally_tagged_variant()
681 Style::Newtype => { in serialize_adjacently_tagged_variant()
721 Style::Newtype => vec![Member::Named(Ident::new("__field0", Span::call_site()))], in serialize_adjacently_tagged_variant()
787 Style::Newtype => { in serialize_untagged_variant()
1300 Style::Newtype if variant.fields[0].attrs.skip_serializing() => Style::Unit, in effective_style()
H A Dde.rs287 Data::Struct(Style::Tuple, fields) | Data::Struct(Style::Newtype, fields) => { in deserialize_body()
322 Data::Struct(Style::Tuple, fields) | Data::Struct(Style::Newtype, fields) => { in deserialize_in_place_body()
1479 Style::Newtype if variant.attrs.deserialize_with().is_none() => { in deserialize_adjacently_tagged_enum()
1803 Style::Newtype => deserialize_externally_tagged_newtype_variant( in deserialize_externally_tagged_variant()
1852 Style::Newtype => deserialize_untagged_newtype_variant( in deserialize_internally_tagged_variant()
1902 Style::Newtype => deserialize_untagged_newtype_variant( in deserialize_untagged_variant()
2093 } else if let Style::Newtype = last.style { in deserialize_custom_identifier()
2931 Style::Newtype => quote! { in unwrap_to_variant_closure()
3009 Style::Newtype if variant.fields[0].attrs.skip_deserializing() => Style::Unit, in effective_style()
/third_party/rust/crates/serde/test_suite/tests/ui/with-variant/
H A Dskip_ser_newtype_field.rs6 Newtype(#[serde(skip_serializing)] String),
H A Dskip_ser_newtype_field_if.rs6 Newtype(#[serde(skip_serializing_if = "always")] String),
H A Dskip_de_newtype_field.rs6 Newtype(#[serde(skip_deserializing)] String),
/third_party/rust/crates/serde/serde_derive_internals/src/
H A Dcheck.rs128 Style::Newtype => { in check_flatten_field()
198 (Style::Newtype, Identifier::Field, false, _) => { in check_identifier()
345 Style::Unit | Style::Newtype | Style::Tuple => {} in check_internal_tag_field_name_conflict()
/third_party/rust/crates/serde/serde_derive/src/internals/
H A Dcheck.rs128 Style::Newtype => { in check_flatten_field()
198 (Style::Newtype, Identifier::Field, false, _) => { in check_identifier()
345 Style::Unit | Style::Newtype | Style::Tuple => {} in check_internal_tag_field_name_conflict()
/third_party/rust/crates/serde/serde/src/private/
H A Dde.rs249 Newtype(Box<Content<'de>>),
286 Content::Newtype(_) => Unexpected::NewtypeStruct, in unexpected()
484 Deserialize::deserialize(deserializer).map(|v| Content::Newtype(Box::new(v))) in visit_newtype_struct()
1146 Content::Newtype(v) => visitor.visit_newtype_struct(ContentDeserializer::new(*v)), in deserialize_any()
1356 Content::Newtype(v) => visitor.visit_newtype_struct(ContentDeserializer::new(*v)), in deserialize_newtype_struct()
1745 Content::Newtype(ref v) => { in deserialize_any()
1924 Content::Newtype(ref v) => { in deserialize_newtype_struct()

Completed in 16 milliseconds