Struct justcsv::CsvWriterConfig
source · pub struct CsvWriterConfig {
pub separator: String,
pub escape: char,
pub newline: NewLine,
}
Expand description
Data struct with CSV writer options
Fields§
§separator: String
Value separator, default is ‘,’
escape: char
Escape character, default is ‘“’
newline: NewLine
New line type
Implementations§
source§impl Config
impl Config
sourcepub fn separator(self, comma: char) -> Self
pub fn separator(self, comma: char) -> Self
Part of Builder pattern. Sets custom value separator
sourcepub fn escape(self, dquote: char) -> Self
pub fn escape(self, dquote: char) -> Self
Part of Builder pattern. Sets custom escape character instead of ‘“’
sourcepub fn rfc_end_of_line(self) -> Self
pub fn rfc_end_of_line(self) -> Self
Part of Builder pattern. Sets end of line according RFC 4180 (default value)
sourcepub fn unix_end_of_line(self) -> Self
pub fn unix_end_of_line(self) -> Self
Part of Builder pattern. Sets end of line in Unix style, i.e. ‘\n’
sourcepub fn custom_end_of_line(self, eoln: impl ToString) -> Self
pub fn custom_end_of_line(self, eoln: impl ToString) -> Self
Part of Builder pattern. Sets custom end of line
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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