Lines Matching refs:cattrs
404 fn deserialize_unit_struct(params: &Parameters, cattrs: &attr::Container) -> Fragment { in deserialize_unit_struct()
406 let type_name = cattrs.name().deserialize_name(); in deserialize_unit_struct()
409 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_unit_struct()
438 cattrs: &attr::Container, in deserialize_tuple()
446 assert!(!cattrs.has_flatten()); in deserialize_tuple()
467 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_tuple()
478 &type_path, params, fields, false, cattrs, &expecting, in deserialize_tuple()
492 let type_name = cattrs.name().deserialize_name(); in deserialize_tuple()
495 let type_name = cattrs.name().deserialize_name(); in deserialize_tuple()
539 cattrs: &attr::Container, in deserialize_tuple_in_place()
547 assert!(!cattrs.has_flatten()); in deserialize_tuple_in_place()
554 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_tuple_in_place()
564 let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting)); in deserialize_tuple_in_place()
578 let type_name = cattrs.name().deserialize_name(); in deserialize_tuple_in_place()
581 let type_name = cattrs.name().deserialize_name(); in deserialize_tuple_in_place()
629 cattrs: &attr::Container, in deserialize_seq()
643 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_seq()
648 let default = Expr(expr_is_missing(field, cattrs)); in deserialize_seq()
709 let let_default = match cattrs.default() { in deserialize_seq()
734 cattrs: &attr::Container, in deserialize_seq_in_place()
746 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_seq_in_place()
753 let default = Expr(expr_is_missing(field, cattrs)); in deserialize_seq_in_place()
801 let let_default = match cattrs.default() { in deserialize_seq_in_place()
893 cattrs: &attr::Container, in deserialize_struct()
922 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_struct()
925 &type_path, params, fields, true, cattrs, &expecting, in deserialize_struct()
928 let (field_visitor, fields_stmt, visit_map) = if cattrs.has_flatten() { in deserialize_struct()
929 deserialize_struct_as_map_visitor(&type_path, params, fields, cattrs) in deserialize_struct()
931 deserialize_struct_as_struct_visitor(&type_path, params, fields, cattrs) in deserialize_struct()
947 } else if is_enum && cattrs.has_flatten() { in deserialize_struct()
955 } else if cattrs.has_flatten() { in deserialize_struct()
960 let type_name = cattrs.name().deserialize_name(); in deserialize_struct()
976 Untagged::No if !cattrs.has_flatten() => Some(quote! { in deserialize_struct()
988 let visitor_seed = if is_enum && cattrs.has_flatten() { in deserialize_struct()
1044 cattrs: &attr::Container, in deserialize_struct_in_place()
1051 if cattrs.has_flatten() { in deserialize_struct_in_place()
1064 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_struct_in_place()
1066 let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting)); in deserialize_struct_in_place()
1069 deserialize_struct_as_struct_in_place_visitor(params, fields, cattrs); in deserialize_struct_in_place()
1090 let type_name = cattrs.name().deserialize_name(); in deserialize_struct_in_place()
1152 cattrs: &attr::Container, in deserialize_enum()
1154 match cattrs.tag() { in deserialize_enum()
1155 attr::TagType::External => deserialize_externally_tagged_enum(params, variants, cattrs), in deserialize_enum()
1157 deserialize_internally_tagged_enum(params, variants, cattrs, tag) in deserialize_enum()
1160 deserialize_adjacently_tagged_enum(params, variants, cattrs, tag, content) in deserialize_enum()
1162 attr::TagType::None => deserialize_untagged_enum(params, variants, cattrs), in deserialize_enum()
1168 cattrs: &attr::Container, in prepare_enum_variant_enum()
1197 cattrs, in prepare_enum_variant_enum()
1208 cattrs: &attr::Container, in deserialize_externally_tagged_enum()
1215 let type_name = cattrs.name().deserialize_name(); in deserialize_externally_tagged_enum()
1217 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_externally_tagged_enum()
1219 let (variants_stmt, variant_visitor) = prepare_enum_variant_enum(variants, cattrs); in deserialize_externally_tagged_enum()
1230 params, variant, cattrs, in deserialize_externally_tagged_enum()
1300 cattrs: &attr::Container, in deserialize_internally_tagged_enum()
1303 let (variants_stmt, variant_visitor) = prepare_enum_variant_enum(variants, cattrs); in deserialize_internally_tagged_enum()
1316 cattrs, in deserialize_internally_tagged_enum()
1328 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_internally_tagged_enum()
1348 cattrs: &attr::Container, in deserialize_adjacently_tagged_enum()
1357 let (variants_stmt, variant_visitor) = prepare_enum_variant_enum(variants, cattrs); in deserialize_adjacently_tagged_enum()
1369 cattrs, in deserialize_adjacently_tagged_enum()
1380 let expecting = cattrs.expecting().unwrap_or(&expecting); in deserialize_adjacently_tagged_enum()
1381 let type_name = cattrs.name().deserialize_name(); in deserialize_adjacently_tagged_enum()
1382 let deny_unknown_fields = cattrs.deny_unknown_fields(); in deserialize_adjacently_tagged_enum()
1646 cattrs: &attr::Container, in deserialize_untagged_enum()
1655 cattrs, in deserialize_untagged_enum()
1672 let fallthrough_msg = cattrs.expecting().unwrap_or(&fallthrough_msg); in deserialize_untagged_enum()
1690 cattrs: &attr::Container, in deserialize_externally_tagged_variant()
1715 cattrs, in deserialize_externally_tagged_variant()
1718 deserialize_tuple(Some(variant_ident), params, &variant.fields, cattrs, None) in deserialize_externally_tagged_variant()
1724 cattrs, in deserialize_externally_tagged_variant()
1734 cattrs: &attr::Container, in deserialize_internally_tagged_variant()
1738 return deserialize_untagged_variant(params, variant, cattrs, deserializer); in deserialize_internally_tagged_variant()
1749 let default = Expr(expr_is_missing(field, cattrs)); in deserialize_internally_tagged_variant()
1767 cattrs, in deserialize_internally_tagged_variant()
1778 cattrs: &attr::Container, in deserialize_untagged_variant()
1798 let default = Expr(expr_is_missing(field, cattrs)); in deserialize_untagged_variant()
1821 cattrs, in deserialize_untagged_variant()
1828 cattrs, in deserialize_untagged_variant()
1839 cattrs: &attr::Container, in deserialize_externally_tagged_newtype_variant()
1845 let default = Expr(expr_is_missing(field, cattrs)); in deserialize_externally_tagged_newtype_variant()
1901 cattrs: &attr::Container, in deserialize_generated_identifier()
1908 let (ignore_variant, fallthrough) = if !is_variant && cattrs.has_flatten() { in deserialize_generated_identifier()
1916 } else if is_variant || cattrs.deny_unknown_fields() { in deserialize_generated_identifier()
1930 !is_variant && cattrs.has_flatten(), in deserialize_generated_identifier()
1934 let lifetime = if !is_variant && cattrs.has_flatten() { in deserialize_generated_identifier()
1972 cattrs: &attr::Container, in deserialize_custom_identifier()
1974 let is_variant = match cattrs.identifier() { in deserialize_custom_identifier()
2054 cattrs.expecting(), in deserialize_custom_identifier()
2371 cattrs: &attr::Container, in deserialize_struct_as_struct_visitor()
2373 assert!(!cattrs.has_flatten()); in deserialize_struct_as_struct_visitor()
2395 let field_visitor = deserialize_generated_identifier(&field_names_idents, cattrs, false, None); in deserialize_struct_as_struct_visitor()
2397 let visit_map = deserialize_map(struct_path, params, fields, cattrs); in deserialize_struct_as_struct_visitor()
2406 cattrs: &attr::Container, in deserialize_struct_as_map_visitor()
2421 let field_visitor = deserialize_generated_identifier(&field_names_idents, cattrs, false, None); in deserialize_struct_as_map_visitor()
2423 let visit_map = deserialize_map(struct_path, params, fields, cattrs); in deserialize_struct_as_map_visitor()
2432 cattrs: &attr::Container, in deserialize_map()
2453 let let_collect = if cattrs.has_flatten() { in deserialize_map()
2505 let ignored_arm = if cattrs.has_flatten() { in deserialize_map()
2513 } else if cattrs.deny_unknown_fields() { in deserialize_map()
2522 let match_keys = if cattrs.deny_unknown_fields() && all_skipped { in deserialize_map()
2545 let missing_expr = Match(expr_is_missing(field, cattrs)); in deserialize_map()
2575 let collected_deny_unknown_fields = if cattrs.has_flatten() && cattrs.deny_unknown_fields() { in deserialize_map()
2596 let value = Expr(expr_is_missing(field, cattrs)); in deserialize_map()
2603 let let_default = match cattrs.default() { in deserialize_map()
2648 cattrs: &attr::Container, in deserialize_struct_as_struct_in_place_visitor()
2650 assert!(!cattrs.has_flatten()); in deserialize_struct_as_struct_in_place_visitor()
2672 let field_visitor = deserialize_generated_identifier(&field_names_idents, cattrs, false, None); in deserialize_struct_as_struct_in_place_visitor()
2674 let visit_map = deserialize_map_in_place(params, fields, cattrs); in deserialize_struct_as_struct_in_place_visitor()
2683 cattrs: &attr::Container, in deserialize_map_in_place()
2685 assert!(!cattrs.has_flatten()); in deserialize_map_in_place()
2744 let ignored_arm = if cattrs.deny_unknown_fields() { in deserialize_map_in_place()
2754 let match_keys = if cattrs.deny_unknown_fields() && all_skipped { in deserialize_map_in_place()
2777 let missing_expr = expr_is_missing(field, cattrs); in deserialize_map_in_place()
2781 && cattrs.default().is_none() in deserialize_map_in_place()
2804 let let_default = match cattrs.default() { in deserialize_map_in_place()
2926 fn expr_is_missing(field: &Field, cattrs: &attr::Container) -> Fragment { in expr_is_missing()
2939 match *cattrs.default() { in expr_is_missing()