pub trait Extension: Send + Sync {
// Required methods
fn info(&self) -> ExtensionInfo;
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
// Provided methods
fn init(&mut self) -> KernelResult<()> { ... }
fn shutdown(&mut self) -> KernelResult<()> { ... }
}Expand description
Base trait for all extensions
Required Methods§
Sourcefn info(&self) -> ExtensionInfo
fn info(&self) -> ExtensionInfo
Get extension information
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Cast to mutable Any for downcasting
Provided Methods§
Sourcefn init(&mut self) -> KernelResult<()>
fn init(&mut self) -> KernelResult<()>
Initialize the extension
Sourcefn shutdown(&mut self) -> KernelResult<()>
fn shutdown(&mut self) -> KernelResult<()>
Shutdown the extension gracefully