pub struct WriteCsvOptions {
pub has_header: bool,
pub delimiter: u8,
pub na_rep: String,
pub quote_style: QuoteStyle,
pub line_terminator: String,
}Expand description
CSV 写入配置选项
控制 DataFrame 导出为 CSV 文件时的格式设置。
§示例
use axion::io::csv::{WriteCsvOptions, QuoteStyle};
let options = WriteCsvOptions::builder()
.with_header(true)
.with_delimiter(b';')
.quote_style(QuoteStyle::Always)
.build();Fields§
§has_header: bool是否写入表头行,默认为 true
delimiter: u8字段分隔符,默认为 ,
na_rep: String用于表示 null 值的字符串,默认为空字符串 ""
quote_style: QuoteStyle字段的引用样式,默认为 QuoteStyle::Necessary
line_terminator: String行终止符,默认为 \n
Implementations§
Source§impl WriteCsvOptions
impl WriteCsvOptions
Sourcepub fn builder() -> WriteCsvOptionsBuilder
pub fn builder() -> WriteCsvOptionsBuilder
创建一个新的 WriteCsvOptions 构建器,使用默认值
Trait Implementations§
Source§impl Clone for WriteCsvOptions
impl Clone for WriteCsvOptions
Source§fn clone(&self) -> WriteCsvOptions
fn clone(&self) -> WriteCsvOptions
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 WriteCsvOptions
impl Debug for WriteCsvOptions
Auto Trait Implementations§
impl Freeze for WriteCsvOptions
impl RefUnwindSafe for WriteCsvOptions
impl Send for WriteCsvOptions
impl Sync for WriteCsvOptions
impl Unpin for WriteCsvOptions
impl UnwindSafe for WriteCsvOptions
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