// phase 4 (test without this extension) let _foo1 = from_str::<Foo>(content_regular).unwrap(); let _foo2 = from_str::<Foo>(content_newtype).unwrap(); let _foo3 = from_str::<Foo>(content_tuple).unwrap();
// phase 5 (test serialization) let pretty_config = PrettyConfig::new()
.extensions(Extensions::EXPLICIT_STRUCT_NAMES | Extensions::UNWRAP_VARIANT_NEWTYPES); let content = to_string_pretty(&foo_ser, pretty_config).unwrap();
assert_eq!(
content,
r#"#![enable(unwrap_variant_newtypes)] #![enable(explicit_struct_names)]
Foo(
id: Id(3),
position: Position(0.0, 8.72),
query: Creature(4),
)"#
); let foo_de = from_str::<Foo>(&content); match foo_de { // GRCOV_EXCL_START
Err(err) => panic!( "failed to deserialize with `explicit_struct_names` and `unwrap_variant_newtypes`: {}",
err
), // GRCOV_EXCL_STOP
Ok(foo_de) => assert_eq!(foo_de, foo_ser),
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.16 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.