Struct r3_core::hunk::HunkDefiner
source · pub struct HunkDefiner<System, T: ?Sized, InitTag> { /* private fields */ }
Expand description
The definer (static builder) for Hunk
.
InitTag
is either DefaultInitTag
or ZeroInitTag
.
Implementations§
source§impl<System: KernelBase + KernelStatic, T: ?Sized, InitTag> HunkDefiner<System, T, InitTag>
impl<System: KernelBase + KernelStatic, T: ?Sized, InitTag> HunkDefiner<System, T, InitTag>
sourcepub const fn len(self, len: usize) -> Self
pub const fn len(self, len: usize) -> Self
Specify the element count. Defaults to 1
. Must be 1
for a non-array
hunk.
sourcepub const fn zeroed(self) -> HunkDefiner<System, T, ZeroInitTag>where
T: Zeroable,
pub const fn zeroed(self) -> HunkDefiner<System, T, ZeroInitTag>where T: Zeroable,
Zero-initialize the hunk.
sourcepub const unsafe fn zeroed_unchecked(
self
) -> HunkDefiner<System, T, ZeroInitTag>
pub const unsafe fn zeroed_unchecked( self ) -> HunkDefiner<System, T, ZeroInitTag>
Zero-initialize the hunk even if it might be unsafe.
Safety
If zero initialization is not a valid bit pattern for T
, accessing the
hunk’s contents may result in an undefined behavior.