pub struct CsvWriter { /* private fields */ }Expand description
A streaming CSV writer that builds output row-by-row.
Implementations§
Source§impl CsvWriter
impl CsvWriter
Sourcepub fn new(headers: Vec<String>, delimiter: char) -> Self
pub fn new(headers: Vec<String>, delimiter: char) -> Self
Create a writer with the given column headers and delimiter.
Sourcepub fn write_row(&mut self, values: &[&str])
pub fn write_row(&mut self, values: &[&str])
Append a row of string values. Extra values are truncated; missing values are filled with empty strings.
Sourcepub fn write_row_f64(&mut self, values: &[f64])
pub fn write_row_f64(&mut self, values: &[f64])
Append a row of f64 values formatted to 6 significant figures.
Auto Trait Implementations§
impl Freeze for CsvWriter
impl RefUnwindSafe for CsvWriter
impl Send for CsvWriter
impl Sync for CsvWriter
impl Unpin for CsvWriter
impl UnsafeUnpin for CsvWriter
impl UnwindSafe for CsvWriter
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.