pub trait Kernel: Default + 'static {
// Required method
fn process(&mut self, cc: &mut KernelCtx<'_>) -> Result<()>;
// Provided methods
fn get_contract(_c: &mut KernelContract<'_>) { ... }
fn open(&mut self, _cc: &mut KernelCtx<'_>) -> Result<()> { ... }
fn close(&mut self, _cc: &mut KernelCtx<'_>) -> Result<()> { ... }
}Expand description
Required Methods§
Provided Methods§
Sourcefn get_contract(_c: &mut KernelContract<'_>)
fn get_contract(_c: &mut KernelContract<'_>)
Declare port types and required side packets. Optional: declaring nothing means every port accepts any payload type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".