pub trait MapInto<F, T>{
type Cont<_T>: ?Sized;
type Elem;
// Required method
fn apply(self, f: F) -> Self::Cont<T>;
}Expand description
MapInto defines an interface for containers capable of applying a given function onto
each of their elements and consuming the container in the process, producing a new
container containing the captured results of each invocation. The trait’s design allows
implementors to specify the exact function signature and output type, utilizing associated
type parameters to define the container and its current element type.
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.