pub struct DecodeOptions {
pub delimiter: Option<Delimiter>,
pub strict: bool,
pub coerce_types: bool,
pub indent: Indent,
pub expand_paths: PathExpansionMode,
}Expand description
Options for decoding TOON format to JSON values.
Fields§
§delimiter: Option<Delimiter>§strict: bool§coerce_types: bool§indent: Indent§expand_paths: PathExpansionModeImplementations§
Source§impl DecodeOptions
impl DecodeOptions
Sourcepub fn with_strict(self, strict: bool) -> Self
pub fn with_strict(self, strict: bool) -> Self
Enable or disable strict mode (validates array lengths, indentation, etc.).
Sourcepub fn with_delimiter(self, delimiter: Delimiter) -> Self
pub fn with_delimiter(self, delimiter: Delimiter) -> Self
Set the expected delimiter (auto-detected if None).
Sourcepub fn with_coerce_types(self, coerce: bool) -> Self
pub fn with_coerce_types(self, coerce: bool) -> Self
Enable or disable type coercion (strings like “123” -> numbers).
pub fn with_indent(self, style: Indent) -> Self
Sourcepub fn with_expand_paths(self, mode: PathExpansionMode) -> Self
pub fn with_expand_paths(self, mode: PathExpansionMode) -> Self
Enable path expansion (v1.5 feature).
When set to Safe, dotted keys will be expanded into nested objects
if all segments are IdentifierSegments.
Conflict handling:
strict=true: Errors on conflictsstrict=false: Last-write-wins
Default: Off
Trait Implementations§
Source§impl Clone for DecodeOptions
impl Clone for DecodeOptions
Source§fn clone(&self) -> DecodeOptions
fn clone(&self) -> DecodeOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecodeOptions
impl Debug for DecodeOptions
Source§impl Default for DecodeOptions
impl Default for DecodeOptions
Source§impl PartialEq for DecodeOptions
impl PartialEq for DecodeOptions
impl Eq for DecodeOptions
impl StructuralPartialEq for DecodeOptions
Auto Trait Implementations§
impl Freeze for DecodeOptions
impl RefUnwindSafe for DecodeOptions
impl Send for DecodeOptions
impl Sync for DecodeOptions
impl Unpin for DecodeOptions
impl UnwindSafe for DecodeOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.