pub trait ObjectInit<T> {
// Required method
fn init(item: *mut T);
}
Expand description
All ZephyrObject
s must implement ObjectInit
in order for first use to be able to initialize
the object.
Required Methods§
Sourcefn init(item: *mut T)
fn init(item: *mut T)
Initialize the object.
This is called upon first use. The address given may (and generally will) be different than
the initial address given to the setup
call in the [ZephyrObject::new
] constructor.
After this is called, all subsequent calls to ZephyrObject::get
will return the same
address, or panic.
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.