#[non_exhaustive]pub struct SerializeOptions {
pub fold_length: usize,
pub compact_multiline: bool,
}Expand description
Options controlling PO serialization.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fold_length: usizePreferred soft line-wrap limit for long string literals.
compact_multiline: boolWhen true, one-line values stay compact instead of always expanding.
Implementations§
Source§impl SerializeOptions
impl SerializeOptions
Sourcepub fn with_fold_length(self, fold_length: usize) -> SerializeOptions
pub fn with_fold_length(self, fold_length: usize) -> SerializeOptions
Returns options that wrap string literals at the given soft limit.
Sourcepub fn with_compact_multiline(self, compact_multiline: bool) -> SerializeOptions
pub fn with_compact_multiline(self, compact_multiline: bool) -> SerializeOptions
Returns options that keep one-line values compact when possible.
Trait Implementations§
Source§impl Clone for SerializeOptions
impl Clone for SerializeOptions
Source§fn clone(&self) -> SerializeOptions
fn clone(&self) -> SerializeOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SerializeOptions
impl Debug for SerializeOptions
Source§impl Default for SerializeOptions
impl Default for SerializeOptions
Source§fn default() -> SerializeOptions
fn default() -> SerializeOptions
Returns the “default value” for a type. Read more
impl Eq for SerializeOptions
Source§impl PartialEq for SerializeOptions
impl PartialEq for SerializeOptions
impl StructuralPartialEq for SerializeOptions
Auto Trait Implementations§
impl Freeze for SerializeOptions
impl RefUnwindSafe for SerializeOptions
impl Send for SerializeOptions
impl Sync for SerializeOptions
impl Unpin for SerializeOptions
impl UnsafeUnpin for SerializeOptions
impl UnwindSafe for SerializeOptions
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