pub struct CsvReader { /* private fields */ }Implementations§
Source§impl CsvReader
impl CsvReader
Sourcepub fn new<P: AsRef<Path>>(
path: P,
delimiter: char,
has_header: bool,
) -> Result<Self>
pub fn new<P: AsRef<Path>>( path: P, delimiter: char, has_header: bool, ) -> Result<Self>
Create a new CSV reader with specified delimiter
Sourcepub fn with_columns<P: AsRef<Path>>(
path: P,
delimiter: char,
columns: Vec<String>,
) -> Result<Self>
pub fn with_columns<P: AsRef<Path>>( path: P, delimiter: char, columns: Vec<String>, ) -> Result<Self>
Create a CSV reader with explicit column names (no header in file)
Sourcepub fn column_names(&self) -> &[String]
pub fn column_names(&self) -> &[String]
Get the column names
Sourcepub fn line_number(&self) -> usize
pub fn line_number(&self) -> usize
Get current line number
Auto Trait Implementations§
impl Freeze for CsvReader
impl RefUnwindSafe for CsvReader
impl Send for CsvReader
impl Sync for CsvReader
impl Unpin for CsvReader
impl UnwindSafe for CsvReader
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