pub trait Module {
// Provided methods
fn early_init() -> Result<(), &'static str> { ... }
fn late_init() -> Result<(), &'static str> { ... }
}Available on crate feature
full only.Expand description
The top level trait for a kernel module.
This is to be implemented on a ZST to allow the module to hook into various points during kernel boot.
§Examples
See the module-level documentation.
Provided Methods§
Sourcefn early_init() -> Result<(), &'static str>
fn early_init() -> Result<(), &'static str>
Called immediately upon kernel start.
At this point many kernel features are unusable, such as threading, async tasks, and memory allocation.
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.