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 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>
§separator: u8
Used as separator.
quote_char: u8
Quoting character.
null: String
Null value representation.
line_terminator: String
String appended after every row.
quote_style: QuoteStyle
When 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 copy 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<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
Checks if this value is equivalent to the given key. Read more
§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