Skip to main content

Initialize

Trait Initialize 

Source
pub trait Initialize<T> {
    type Output;

    // Required method
    fn init(self, with: T) -> Self::Output;
}
Expand description

Initialize provides a mechanism for initializing some object using a value of type T to produce another object.

Required Associated Types§

Required Methods§

Source

fn init(self, with: T) -> Self::Output

initializes the object using the given value, consuming the caller to produce another object

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§