Mapper

Trait Mapper 

Source
pub trait Mapper<T, U> {
    // Required method
    fn apply(&self, value: &T) -> U;
}
Expand description

Trait for types that can be used as mapper functions.

Required Methods§

Source

fn apply(&self, value: &T) -> U

Apply the mapper to the given value.

Implementors§

Source§

impl<T, U, F> Mapper<T, U> for F
where F: Fn(&T) -> U,