InitWith

Trait InitWith 

Source
pub trait InitWith<F, U> {
    type Cont<T>;

    // Required method
    fn init_with(f: F) -> Self::Cont<U>
       where F: FnOnce() -> U,
             Self: Sized;
}
Expand description

InitWith enables a container to

Required Associated Types§

Source

type Cont<T>

Required Methods§

Source

fn init_with(f: F) -> Self::Cont<U>
where F: FnOnce() -> U, Self: Sized,

consumes the current instance to initialize a new one

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§