pub trait MapInto<F, X>{
type Cont<U>: ?Sized;
type Elem;
// Required method
fn map_into(self, f: F) -> Self::Cont<X>;
}Expand description
MapInto describes a consuming interface for containers that enables the mapping of a
given function onto each element of the container. While the trait definition constrains
the generic function parameters, F to a FnOnce closure, implementors coulds choose
to strengthen this constraint to FnMut or Fn as needed.
Required Associated Types§
Required Methods§
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.