pub struct InMemoryCsvWriter { /* private fields */ }Expand description
In-memory CSV writer with configurable delimiter and floating-point precision.
Implementations§
Source§impl InMemoryCsvWriter
impl InMemoryCsvWriter
Sourcepub fn new(columns: &[&str], delimiter: char) -> Self
pub fn new(columns: &[&str], delimiter: char) -> Self
Create a new InMemoryCsvWriter with the given column names and delimiter.
Sourcepub fn with_precision(self, precision: usize) -> Self
pub fn with_precision(self, precision: usize) -> Self
Set the floating-point precision used when formatting values.
Sourcepub fn write_row(&self, values: &[f64]) -> Result<String, Error>
pub fn write_row(&self, values: &[f64]) -> Result<String, Error>
Format a single row of values as a delimited string (no newline).
Sourcepub fn write_header(&self) -> String
pub fn write_header(&self) -> String
Return the header line (no newline).
Auto Trait Implementations§
impl Freeze for InMemoryCsvWriter
impl RefUnwindSafe for InMemoryCsvWriter
impl Send for InMemoryCsvWriter
impl Sync for InMemoryCsvWriter
impl Unpin for InMemoryCsvWriter
impl UnsafeUnpin for InMemoryCsvWriter
impl UnwindSafe for InMemoryCsvWriter
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.