[][src]Struct r3::hunk::CfgHunkBuilder

#[must_use = "must call `finish()` to complete registration"]pub struct CfgHunkBuilder<System, T: ?Sized, InitTag> { /* fields omitted */ }

Configuration builder type for Hunk.

InitTag is either DefaultInitTag or ZeroInitTag.

Implementations

impl<System: Kernel, T: ?Sized, InitTag> CfgHunkBuilder<System, T, InitTag>[src]

pub const fn len(self, len: usize) -> Self[src]

Specify the element count. Defaults to 1. Must be 1 for a non-array hunk.

pub const fn align(self, align: usize) -> Self[src]

Specify the minimum alignment. Defaults to 1.

pub const fn zeroed(self) -> CfgHunkBuilder<System, T, ZeroInitTag> where
    T: ZeroInit
[src]

Zero-initialize the hunk.

pub const unsafe fn zeroed_unchecked(
    self
) -> CfgHunkBuilder<System, T, ZeroInitTag>
[src]

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.

impl<System: Kernel, T, InitTag: HunkIniter<T>> CfgHunkBuilder<System, T, InitTag>[src]

pub const fn finish(self, cfg: &mut CfgBuilder<System>) -> Hunk<System, T>[src]

Complete the definition of a hunk, returning a reference to the hunk.

impl<System: Port, T, InitTag: HunkIniter<T>> CfgHunkBuilder<System, [T], InitTag>[src]

pub const fn finish(self, cfg: &mut CfgBuilder<System>) -> Hunk<System, [T]>[src]

Complete the definition of a hunk, returning a reference to the hunk.

Auto Trait Implementations

impl<System, T: ?Sized, InitTag> Send for CfgHunkBuilder<System, T, InitTag> where
    InitTag: Send,
    System: Send,
    T: Send
[src]

impl<System, T: ?Sized, InitTag> Sync for CfgHunkBuilder<System, T, InitTag> where
    InitTag: Sync,
    System: Sync,
    T: Sync
[src]

impl<System, T: ?Sized, InitTag> Unpin for CfgHunkBuilder<System, T, InitTag> where
    InitTag: Unpin,
    System: Unpin,
    T: Unpin
[src]

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.