Skip to main content

Mapper

Trait Mapper 

Source
pub trait Mapper<Item> {
    type Output;

    // Required method
    fn map(&mut self, item: Item) -> Self::Output;
}
Expand description

Trait for mapping input into output.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn map(&mut self, item: Item) -> Self::Output

Map item into output.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T, I, O> Mapper<I> for T
where T: FnMut(I) -> O,