[][src]Struct r3::kernel::Hunk

pub struct Hunk<System> { /* fields omitted */ }

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

impl<System: Port> Hunk<System>[src]

pub const fn build() -> CfgHunkBuilder<System>[src]

Construct a CfgTaskBuilder to define a hunk in a configuration function.

impl<System> Hunk<System>[src]

pub const fn offset(self) -> usize[src]

Get the offset of the hunk.

impl<System: Kernel> Hunk<System>[src]

pub fn as_ptr(self) -> *mut u8[src]

Get a raw pointer to the hunk's contents.

Trait Implementations

impl<System> Clone for Hunk<System>[src]

impl<System> Copy for Hunk<System>[src]

impl<System: Kernel> Debug for Hunk<System>[src]

impl<System> Init for Hunk<System>[src]

Auto Trait Implementations

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.