pub struct CsvLoader {
pub has_header: bool,
pub delimiter: char,
pub target_columns: Vec<usize>,
pub skip_columns: Vec<usize>,
}Expand description
CSV data loader.
Fields§
§has_header: boolWhether the CSV has a header row.
delimiter: charDelimiter character.
target_columns: Vec<usize>Indices of target columns (0-based).
skip_columns: Vec<usize>Columns to skip.
Implementations§
Source§impl CsvLoader
impl CsvLoader
Sourcepub fn with_header(self, has_header: bool) -> Self
pub fn with_header(self, has_header: bool) -> Self
Set whether CSV has a header.
Sourcepub fn with_delimiter(self, delimiter: char) -> Self
pub fn with_delimiter(self, delimiter: char) -> Self
Set the delimiter character.
Sourcepub fn with_target_columns(self, columns: Vec<usize>) -> Self
pub fn with_target_columns(self, columns: Vec<usize>) -> Self
Set target column indices.
Sourcepub fn with_skip_columns(self, columns: Vec<usize>) -> Self
pub fn with_skip_columns(self, columns: Vec<usize>) -> Self
Set columns to skip.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CsvLoader
impl RefUnwindSafe for CsvLoader
impl Send for CsvLoader
impl Sync for CsvLoader
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more