Trait Map

Source
pub trait Map: Sized {
    // Provided method
    fn map<I, R, F>(self, func: F) -> Mapped<Self, I, R, F>
       where Self: Typed<Output = I>,
             I: Into<Variant>,
             R: Into<Variant>,
             F: Fn(I) -> R + Clone { ... }
}
Expand description

Mappable cast trait.

Provided Methods§

Source

fn map<I, R, F>(self, func: F) -> Mapped<Self, I, R, F>
where Self: Typed<Output = I>, I: Into<Variant>, R: Into<Variant>, F: Fn(I) -> R + Clone,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, X> Map for T
where T: Typed<Output = X>, X: Into<Variant>,