pub trait KernelOrTask<'a>:
Debug
+ Clone
+ Copy {
// Required methods
fn kernel(&self) -> &'a Kernel;
fn maybe_task(&self) -> Option<&'a CurrentTask>;
}Expand description
An object that can be either a Kernel or a CurrentTask.
This allows to retrieve the Kernel from it, and the task if it is available.
Required Methods§
fn kernel(&self) -> &'a Kernel
fn maybe_task(&self) -> Option<&'a CurrentTask>
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.