pub struct WriteCsvOptionsBuilder { /* private fields */ }Expand description
WriteCsvOptions 的构建器
提供了一种链式调用的方式来配置 CSV 写入选项。
Implementations§
Source§impl WriteCsvOptionsBuilder
impl WriteCsvOptionsBuilder
Sourcepub fn with_header(self, has_header: bool) -> Self
pub fn with_header(self, has_header: bool) -> Self
设置是否写入表头行
Sourcepub fn with_delimiter(self, delimiter: u8) -> Self
pub fn with_delimiter(self, delimiter: u8) -> Self
设置字段分隔符
Sourcepub fn na_representation(self, na_rep: String) -> Self
pub fn na_representation(self, na_rep: String) -> Self
设置用于表示 null 值的字符串
Sourcepub fn quote_style(self, style: QuoteStyle) -> Self
pub fn quote_style(self, style: QuoteStyle) -> Self
设置字段的引用样式
Sourcepub fn line_terminator(self, terminator: String) -> Self
pub fn line_terminator(self, terminator: String) -> Self
设置行终止符
例如:"\n" (LF), "\r\n" (CRLF)
Sourcepub fn build(self) -> WriteCsvOptions
pub fn build(self) -> WriteCsvOptions
构建最终的 WriteCsvOptions 实例
未在构建器中设置的字段将使用默认值
Trait Implementations§
Source§impl Clone for WriteCsvOptionsBuilder
impl Clone for WriteCsvOptionsBuilder
Source§fn clone(&self) -> WriteCsvOptionsBuilder
fn clone(&self) -> WriteCsvOptionsBuilder
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 WriteCsvOptionsBuilder
impl Debug for WriteCsvOptionsBuilder
Source§impl Default for WriteCsvOptionsBuilder
impl Default for WriteCsvOptionsBuilder
Source§fn default() -> WriteCsvOptionsBuilder
fn default() -> WriteCsvOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WriteCsvOptionsBuilder
impl RefUnwindSafe for WriteCsvOptionsBuilder
impl Send for WriteCsvOptionsBuilder
impl Sync for WriteCsvOptionsBuilder
impl Unpin for WriteCsvOptionsBuilder
impl UnwindSafe for WriteCsvOptionsBuilder
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