Init

Trait Init 

Source
pub trait Init<B, InitArgs = ()>: Sized
where B: Backend, InitArgs: Send + 'static,
{ type Error; // Required method fn init(args: &InitArgs, device: &B::Device) -> Result<Self, Self::Error>; }
Expand description

Trait for models that can be initialized from user-defined arguments.

Required Associated Types§

Required Methods§

Source

fn init(args: &InitArgs, device: &B::Device) -> Result<Self, Self::Error>

Initialize the model from the given arguments and device.

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§