pub struct AcrossSpec {
pub cols: Vec<String>,
pub transform: AcrossTransform,
pub name_template: Option<String>,
}Expand description
An across() specification: select columns and apply one function.
Fields§
§cols: Vec<String>Columns to transform (by name).
transform: AcrossTransformTransform to apply.
name_template: Option<String>Optional output name template. None → “{col}_{fn}”.
Use {col} and {fn} as placeholders.
Implementations§
Source§impl AcrossSpec
impl AcrossSpec
pub fn new( cols: impl IntoIterator<Item = impl Into<String>>, transform: AcrossTransform, ) -> Self
pub fn with_template(self, tmpl: impl Into<String>) -> Self
Sourcepub fn output_name(&self, col_name: &str) -> String
pub fn output_name(&self, col_name: &str) -> String
Generate the output column name for a given input column.
Auto Trait Implementations§
impl Freeze for AcrossSpec
impl !RefUnwindSafe for AcrossSpec
impl !Send for AcrossSpec
impl !Sync for AcrossSpec
impl Unpin for AcrossSpec
impl UnsafeUnpin for AcrossSpec
impl !UnwindSafe for AcrossSpec
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> 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