Trait map_box::Map

source ·
pub trait Map<T1> {
    type Target<T2>;

    // Required method
    fn map_box<T2>(self, f: impl FnMut(T1) -> T2) -> Self::Target<T2>;
}

Required Associated Types§

source

type Target<T2>

Required Methods§

source

fn map_box<T2>(self, f: impl FnMut(T1) -> T2) -> Self::Target<T2>

Returns a box, with function f applied to the value inside. This function will re-use the allocation when possible.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T1> Map<T1> for Box<T1>

source§

fn map_box<T2>(self, f: impl FnMut(T1) -> T2) -> Self::Target<T2>

Returns a box, with function f applied to the value inside. This function will re-use the allocation when possible.

§

type Target<T2> = Box<T2>

Implementors§