Skip to main content

Transform

Trait Transform 

Source
pub trait Transform {
    // Required methods
    fn name(&self) -> String;
    fn add_row(&mut self, headers: &Headers, row: &Row) -> Result<(), Error>;
    fn value(&self) -> String;

    // Provided method
    fn hash(
        &self,
        _hasher: &mut DefaultHasher,
        _headers: &Headers,
        _row: &Row,
    ) -> Result<(), Error> { ... }
}
Expand description

For grouping and reducing rows.

Required Methods§

Source

fn name(&self) -> String

Get the resulting column name

Source

fn add_row(&mut self, headers: &Headers, row: &Row) -> Result<(), Error>

Combine the row with the value

Source

fn value(&self) -> String

Turn the current value to a string

Provided Methods§

Source

fn hash( &self, _hasher: &mut DefaultHasher, _headers: &Headers, _row: &Row, ) -> Result<(), Error>

Add the row to the hasher to group this row separately from others

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§