pub enum ColSpec {
Regex {
source: String,
colname: String,
coldef: String,
regex: Regex,
},
Mix {
colname: String,
coldef: String,
},
}
Expand description
Types of specifications available to create a new column.
Variants
Regex
Creates a new column based on a previous column using a regular expression to extract information from it.
Mix
Create a new column by mixing existing columns using a template
E.g. assuming that the month
and day
columns exist:
use csvsc::add::ColSpec;
let spec = ColSpec::Mix {
colname: "new_col".to_string(),
coldef: "{day}/{month}".to_string(),
};
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ColSpec
impl Send for ColSpec
impl Sync for ColSpec
impl Unpin for ColSpec
impl UnwindSafe for ColSpec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more