pub struct SerializeOptions {
pub date_format: Option<String>,
pub time_format: Option<String>,
pub datetime_format: Option<String>,
pub float_scientific: Option<bool>,
pub float_precision: Option<usize>,
pub decimal_comma: bool,
pub separator: u8,
pub quote_char: u8,
pub null: String,
pub line_terminator: String,
pub quote_style: QuoteStyle,
}Available on crate feature
polars-io only.Expand description
Options to serialize logical types to CSV.
The default is to format times and dates as chrono crate formats them.
Fields§
§date_format: Option<String>Used for DataType::Date.
time_format: Option<String>Used for DataType::Time.
datetime_format: Option<String>Used for DataType::Datetime.
float_scientific: Option<bool>Used for DataType::Float64
and DataType::Float32.
float_precision: Option<usize>§decimal_comma: boolUse comma as the decimal separator.
separator: u8Used as separator.
quote_char: u8Quoting character.
null: StringNull value representation.
line_terminator: StringString appended after every row.
quote_style: QuoteStyleWhen to insert quotes.
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<'de> Deserialize<'de> for SerializeOptions
impl<'de> Deserialize<'de> for SerializeOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializeOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializeOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SerializeOptions
impl Hash for SerializeOptions
Source§impl PartialEq for SerializeOptions
impl PartialEq for SerializeOptions
Source§impl Serialize for SerializeOptions
impl Serialize for SerializeOptions
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq 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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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