pub struct Options {
pub quote_style: QuoteStyle,
pub binary_encoding: BinaryEncoding,
pub unquoted_keys: bool,
pub leading_plus: bool,
pub sort_keys: bool,
pub escape_unicode: bool,
pub use_zulu: bool,
pub timestamp_precision: TimestampPrecision,
}Expand description
Formatting options for JAML output.
Fields§
§quote_style: QuoteStyleQuote style for strings.
binary_encoding: BinaryEncodingBinary data encoding preference.
unquoted_keys: boolUse unquoted keys in maps when possible.
leading_plus: boolAdd leading plus sign to positive numbers (+42, +3.14, +inf).
sort_keys: boolSort map keys alphabetically for consistent output.
escape_unicode: boolEscape all non-ASCII characters as \uXXXX sequences.
use_zulu: boolUse ‘Z’ for UTC timestamps instead of ‘+00:00’.
timestamp_precision: TimestampPrecisionPrecision for timestamp fractional seconds.
Implementations§
Source§impl Options
impl Options
Sourcepub fn with_quote_style(self, style: QuoteStyle) -> Self
pub fn with_quote_style(self, style: QuoteStyle) -> Self
Sets the quote style.
Sourcepub fn with_binary_encoding(self, encoding: BinaryEncoding) -> Self
pub fn with_binary_encoding(self, encoding: BinaryEncoding) -> Self
Sets the binary encoding preference.
Sourcepub fn with_unquoted_keys(self, enable: bool) -> Self
pub fn with_unquoted_keys(self, enable: bool) -> Self
Sets whether to use unquoted keys.
Sourcepub fn with_leading_plus(self, enable: bool) -> Self
pub fn with_leading_plus(self, enable: bool) -> Self
Sets whether to add leading plus sign to positive numbers.
Sourcepub fn with_sort_keys(self, enable: bool) -> Self
pub fn with_sort_keys(self, enable: bool) -> Self
Sets whether to sort map keys alphabetically.
Sourcepub fn with_escape_unicode(self, enable: bool) -> Self
pub fn with_escape_unicode(self, enable: bool) -> Self
Sets whether to escape non-ASCII characters as \uXXXX.
Sourcepub fn with_use_zulu(self, enable: bool) -> Self
pub fn with_use_zulu(self, enable: bool) -> Self
Sets whether to use ‘Z’ for UTC timestamps instead of ‘+00:00’.
Sourcepub fn with_timestamp_precision(self, precision: TimestampPrecision) -> Self
pub fn with_timestamp_precision(self, precision: TimestampPrecision) -> Self
Sets the precision for timestamp fractional seconds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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