Expand description
Serde serializer for structprop documents.
Serde Serializer for the structprop format.
The public entry point is to_string. Internally a Serializer walks
the serde data model and writes structprop text directly into an output
String.
§Type mapping
| Rust / serde | Structprop output |
|---|---|
bool | true or false scalar |
| integer / float | numeric scalar |
String / &str | bare scalar or "quoted" if it contains special chars |
None / () | null scalar |
| struct / map | key { … } block at the current indentation level |
Vec<T> / sequence | = { … } inline list |
| unit enum variant | bare variant name scalar |
| newtype / tuple / struct enum variant | variant_name { … } block |
Structs§
- MapSerializer
ser::SerializeMap(and struct impls) that writeskey = value/key { … }entries one at a time.- SeqSerializer
ser::SerializeSeq(and related tuple impls) that collects rendered items then emits them as a{ … }block.- Serializer
- Core serializer that accumulates structprop text in
output.