Lines Matching refs:cattrs
223 fn serialize_unit_struct(cattrs: &attr::Container) -> Fragment { in serialize_unit_struct()
224 let type_name = cattrs.name().serialize_name(); in serialize_unit_struct()
234 cattrs: &attr::Container, in serialize_newtype_struct()
236 let type_name = cattrs.name().serialize_name(); in serialize_newtype_struct()
260 cattrs: &attr::Container, in serialize_tuple_struct()
265 let type_name = cattrs.name().serialize_name(); in serialize_tuple_struct()
296 fn serialize_struct(params: &Parameters, fields: &[Field], cattrs: &attr::Container) -> Fragment { in serialize_struct()
299 if cattrs.has_flatten() { in serialize_struct()
300 serialize_struct_as_map(params, fields, cattrs) in serialize_struct()
302 serialize_struct_as_struct(params, fields, cattrs) in serialize_struct()
306 fn serialize_struct_tag_field(cattrs: &attr::Container, struct_trait: &StructTrait) -> TokenStream { in serialize_struct_tag_field()
307 match cattrs.tag() { in serialize_struct_tag_field()
309 let type_name = cattrs.name().serialize_name(); in serialize_struct_tag_field()
322 cattrs: &attr::Container, in serialize_struct_as_struct()
327 let type_name = cattrs.name().serialize_name(); in serialize_struct_as_struct()
329 let tag_field = serialize_struct_tag_field(cattrs, &StructTrait::SerializeStruct); in serialize_struct_as_struct()
363 cattrs: &attr::Container, in serialize_struct_as_map()
368 let tag_field = serialize_struct_tag_field(cattrs, &StructTrait::SerializeMap); in serialize_struct_as_map()
378 let len = if cattrs.has_flatten() { in serialize_struct_as_map()
404 fn serialize_enum(params: &Parameters, variants: &[Variant], cattrs: &attr::Container) -> Fragment { in serialize_enum()
413 serialize_variant(params, variant, variant_index as u32, cattrs) in serialize_enum()
428 cattrs: &attr::Container, in serialize_variant()
478 let body = Match(match cattrs.tag() { in serialize_variant()
480 serialize_externally_tagged_variant(params, variant, variant_index, cattrs) in serialize_variant()
483 serialize_internally_tagged_variant(params, variant, cattrs, tag) in serialize_variant()
486 serialize_adjacently_tagged_variant(params, variant, cattrs, tag, content) in serialize_variant()
488 attr::TagType::None => serialize_untagged_variant(params, variant, cattrs), in serialize_variant()
501 cattrs: &attr::Container, in serialize_externally_tagged_variant()
503 let type_name = cattrs.name().serialize_name(); in serialize_externally_tagged_variant()
573 cattrs: &attr::Container, in serialize_internally_tagged_variant()
576 let type_name = cattrs.name().serialize_name(); in serialize_internally_tagged_variant()
639 cattrs: &attr::Container, in serialize_adjacently_tagged_variant()
644 let type_name = cattrs.name().serialize_name(); in serialize_adjacently_tagged_variant()
753 cattrs: &attr::Container, in serialize_untagged_variant()
783 let type_name = cattrs.name().serialize_name(); in serialize_untagged_variant()