pub struct EncodeOptions {
pub delimiter: Option<Delimiter>,
pub length_marker: Option<char>,
pub indent: Option<usize>,
}Expand description
Options for encoding TOON format
Fields§
§delimiter: Option<Delimiter>Delimiter for tabular arrays (default: comma)
length_marker: Option<char>Optional hash prefix for array lengths (e.g., [#3] instead of [3])
indent: Option<usize>Number of spaces per indentation level (default: 2)
Implementations§
Source§impl EncodeOptions
impl EncodeOptions
Sourcepub fn length_marker(self, marker: char) -> Self
pub fn length_marker(self, marker: char) -> Self
Set the length marker (typically '#')
Sourcepub fn get_delimiter(&self) -> char
pub fn get_delimiter(&self) -> char
Get the delimiter, defaulting to comma
Sourcepub fn get_indent(&self) -> usize
pub fn get_indent(&self) -> usize
Get the indentation, defaulting to 2
Trait Implementations§
Source§impl Clone for EncodeOptions
impl Clone for EncodeOptions
Source§fn clone(&self) -> EncodeOptions
fn clone(&self) -> EncodeOptions
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 EncodeOptions
impl Debug for EncodeOptions
Source§impl Default for EncodeOptions
impl Default for EncodeOptions
Source§fn default() -> EncodeOptions
fn default() -> EncodeOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncodeOptions
impl RefUnwindSafe for EncodeOptions
impl Send for EncodeOptions
impl Sync for EncodeOptions
impl Unpin for EncodeOptions
impl UnwindSafe for EncodeOptions
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