Struct r3::hunk::Hunk [−][src]
pub struct Hunk<System, T: ?Sized> { /* fields omitted */ }
Expand description
Represents a single typed 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 type is implemented on top of r3::kernel::Hunk
, the untyped
hunk type.
Implementations
Construct a CfgTaskBuilder
to define a hunk in a configuration
function.
Reinterpret the hunk as another type.
Safety
- Similarly to
core::mem::transmute
, this is incredibly unsafe. - The byte offset must be valid for the destination type.
Get the untyped hunk.