Trait Init

Source
pub trait Init {
    // Required method
    fn init(self) -> Self
       where Self: Sized;
}
Expand description

A trait for creating custom initialization routines for models or other entities.

Required Methods§

Source

fn init(self) -> Self
where Self: Sized,

consumes the current instance to initialize a new one

Implementors§