[][src]Struct r3::kernel::cfg::CfgStartupHookBuilder

#[must_use = "must call `finish()` to complete registration"]pub struct CfgStartupHookBuilder<System> { /* fields omitted */ }

Configuration builder type for StartupHook.

Implementations

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

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

[Required] Specify the entry point.

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

Specify the parameter to start. Defaults to 0.

pub const fn priority(self, priority: i32) -> Self[src]

Specify the priority. Defaults to 0 when unspecified.

Startup hooks will execute in the ascending order of priority. Startup hooks with identical priority values will execute in the registration order.

priority must not be negative. This limitation can be relaxed by calling Self::unchecked.

pub const unsafe fn unchecked(self) -> Self[src]

Allow the use of a negative priority value.

Safety

Startup hooks with negative priority values can rely on their execution order for memory safety.

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

Complete the registration of a startup hook, returning an StartupHook object.

Auto Trait Implementations

impl<System> Send for CfgStartupHookBuilder<System> where
    System: Send
[src]

impl<System> Sync for CfgStartupHookBuilder<System> where
    System: Sync
[src]

impl<System> Unpin for CfgStartupHookBuilder<System> where
    System: 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.