pub struct Config {
pub delimiter: u8,
pub key_folding: bool,
pub flatten_depth: Option<usize>,
pub empty_array_bare: bool,
pub escape_controls: bool,
}Expand description
Encoder configuration matching TOON spec v3.1 options.
Fields§
§delimiter: u8Delimiter between array/tabular values. Must be ,, \t, or |.
key_folding: boolIf true, fold single-key object chains into dot-notation keys (safe mode).
flatten_depth: Option<usize>Max fold depth (segments). None = unlimited. 0 disables folding.
empty_array_bare: boolIf true (v3.1), emit empty arrays as canonical [] / key: []
instead of the legacy [0]: / key[0]: length-marker form.
escape_controls: boolIf true (v3.1), escape control chars U+0000–U+001F (except the named
\n \r \t) as \uXXXX with lowercase hex.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more