Trait MapOnce

Source
pub trait MapOnce<T> {
    type Cont<_T: ?Sized>;

    // Required method
    fn mapc<U, F>(self, rhs: F) -> Self::Cont<U>
       where F: FnOnce(T) -> U;
}
Expand description

A the MapOnce trait is similar to Map, but it consumes the instance instead of borrowing it;

Required Associated Types§

Source

type Cont<_T: ?Sized>

Required Methods§

Source

fn mapc<U, F>(self, rhs: F) -> Self::Cont<U>
where F: FnOnce(T) -> U,

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§