pub trait Init: Sized {
// Required method
fn init(self, context: &mut CubeContext) -> Self;
}
Expand description
Trait to be implemented by cube types implementations.
Required Methods§
Sourcefn init(self, context: &mut CubeContext) -> Self
fn init(self, context: &mut CubeContext) -> Self
Initialize a type within a context.
You can return the same value when the variable is a non-mutable data structure or if the type can not be deeply cloned/copied.
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.