pub struct CsvLoader { /* private fields */ }Expand description
Parser state carried between chunks.
Implementations§
Source§impl CsvLoader
impl CsvLoader
pub fn new(opts: CsvOptions) -> Result<Self, String>
Sourcepub fn feed(&mut self, t: &mut DynTable, chunk: &[u8]) -> Result<(), String>
pub fn feed(&mut self, t: &mut DynTable, chunk: &[u8]) -> Result<(), String>
Parse the next chunk; rows completed in it are appended to t.
Sourcepub fn finish(&mut self, t: &mut DynTable) -> Result<usize, String>
pub fn finish(&mut self, t: &mut DynTable) -> Result<usize, String>
End of input: a last row without a trailing newline is added.
Sourcepub fn names(&self) -> Option<&[String]>
pub fn names(&self) -> Option<&[String]>
The column names: from the header row once it has been read, or as given.
Sourcepub fn starting_at_line(self, line: usize) -> Self
pub fn starting_at_line(self, line: usize) -> Self
Number error messages from line, for a loader fed a piece of a file that starts on that line.
Auto Trait Implementations§
impl Forget for CsvLoader
impl Freeze for CsvLoader
impl Move for CsvLoader
impl RefUnwindSafe for CsvLoader
impl Send for CsvLoader
impl Sync for CsvLoader
impl Unpin for CsvLoader
impl UnsafeUnpin for CsvLoader
impl UnwindSafe for CsvLoader
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