Expand description
Formatting wrappers for per-value YAML output style control. Formatting wrappers for fine-grained control over YAML output style.
These wrappers let you control the YAML output style per-value rather than
globally via SerializerConfig. Each wrapper
serializes transparently during deserialization but emits style hints during
serialization.
§Examples
use noyalib::fmt::{FlowSeq, LitString};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
struct Config {
tags: FlowSeq<Vec<String>>,
script: LitString,
}Structs§
- Commented
- Attach an inline YAML comment
# ...after a value. - FlowMap
- Force flow style
{k: v, ...}for a mapping value. - FlowSeq
- Force flow style
[a, b, c]for a sequence value. - FoldStr
- Force folded block scalar
>style for a borrowed string. - Fold
String - Force folded block scalar
>style for an owned string. - LitStr
- Force literal block scalar
|style for a borrowed string. - LitString
- Force literal block scalar
|style for an owned string. - Space
After - Emit a blank line after the value.