Skip to main content

Map

Trait Map 

Source
pub trait Map {
    type Entry<T>;

    // Required method
    fn map<T, U>(
        entry: Self::Entry<T>,
        map: impl FnOnce(T) -> U,
    ) -> Self::Entry<U>;
}

Required Associated Types§

Source

type Entry<T>

Required Methods§

Source

fn map<T, U>(entry: Self::Entry<T>, map: impl FnOnce(T) -> U) -> Self::Entry<U>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<M: Map> Map for Dequeued<M>

Source§

type Entry<T> = Dequeued<<M as Map>::Entry<T>>