pub struct Hunk<System: KernelStatic> { /* private fields */ }
Expand description
Represents a single hunk in a system.
Hunks are nothing more than static variables defined in a kernel configuration. They come in handy when you are designing a component that can be instantiated by a kernel configuration and wanting each instance to have its own separate state data.
This Hunk
is untyped and only contains a starting address. See
r3::hunk::Hunk
for a type-safe wrapper of Hunk
.
Relation to Other Specifications: None. The need for programmatically defining static regions has been traditionally fulfilled by code generation and preprocessor-based composition. The closest thing might be cell internal variables in the component system that comes with the TOPPERS kernels.
Implementations
sourceimpl<System: KernelStatic> Hunk<System>
impl<System: KernelStatic> Hunk<System>
sourcepub const fn define() -> HunkDefiner<System>
pub const fn define() -> HunkDefiner<System>
Construct a HunkDefiner
to define a hunk in a
configuration function.
Trait Implementations
sourceimpl<System: KernelStatic> Clone for Hunk<System>
impl<System: KernelStatic> Clone for Hunk<System>
sourceimpl<System: KernelStatic> Debug for Hunk<System>
impl<System: KernelStatic> Debug for Hunk<System>
impl<System: KernelStatic> Copy for Hunk<System>
Auto Trait Implementations
impl<System> RefUnwindSafe for Hunk<System> where
System: RefUnwindSafe,
impl<System> Send for Hunk<System> where
System: Send,
impl<System> Sync for Hunk<System> where
System: Sync,
impl<System> Unpin for Hunk<System> where
System: Unpin,
impl<System> UnwindSafe for Hunk<System> where
System: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more