pub struct SerializeOptions {
pub compact: bool,
pub newline: bool,
pub keys_as_csv_headers: bool,
pub csv_delimiter: Option<u8>,
pub text_join_separator: Option<String>,
}Expand description
Options for the Serializer. The options are context specific and may only be honored when
serializing into a certain Encoding.
Fields§
§compact: boolEmit output data in a compact format. This will disable pretty printing for encodings that support it.
newline: boolAppend a trailing newline to the serialized data.
keys_as_csv_headers: boolWhen the input is an array of objects and the output encoding is CSV, the field names of the first object will be used as CSV headers. Field values of all following objects will be matched to the right CSV column based on their key. Missing fields produce empty columns while excess fields are ignored.
csv_delimiter: Option<u8>Optional custom delimiter for CSV output.
text_join_separator: Option<String>Optional seprator to join text output with.
Implementations§
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 · 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
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more