pub struct InterruptHandlerDefiner<System: KernelInterruptLine> { /* private fields */ }
Expand description

The definer (static builder) for StaticInterruptHandler.

Implementations§

source§

impl<System: KernelInterruptLine> InterruptHandlerDefiner<System>

source

pub const fn start<C: IntoClosureConst>(self, start: C) -> Self

[Required] Specify the entry point.

source

pub const fn line(self, line: InterruptNum) -> Self

[Required] Specify the interrupt line to attach the interrupt handler to.

source

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

Specify the priority. Defaults to 0 when unspecified.

When multiple handlers are registered to a single interrupt line, those with smaller priority values will execute earlier.

This should not be confused with an interrupt line’s priority.

source

pub const unsafe fn unmanaged(self) -> Self

Indicate that the entry point function is unmanaged-safe (designed to execute as an unmanaged interrupt handler).

If an interrupt line is not configured with an initial priority value that falls within a managed range, configuration will fail unless all of its attached interrupt handlers are marked as unmanaged-safe.

Safety

The behavior of system calls is undefined in an unmanaged interrupt handler.

source

pub const fn finish<C: CfgInterruptLine<System = System>>( self, cfg: &mut Cfg<'_, C> ) -> StaticInterruptHandler<System>

Complete the registration of an interrupt handler, returning an StaticInterruptHandler object.

Trait Implementations§

source§

impl<System: KernelInterruptLine> ExecutableDefiner for InterruptHandlerDefiner<System>

source§

const fn start(self, start: Closure) -> Self

Use the specified function as the entry point of the executable object being defined.

Auto Trait Implementations§

§

impl<System> RefUnwindSafe for InterruptHandlerDefiner<System>

§

impl<System> Send for InterruptHandlerDefiner<System>

§

impl<System> Sync for InterruptHandlerDefiner<System>

§

impl<System> Unpin for InterruptHandlerDefiner<System>

§

impl<System> UnwindSafe for InterruptHandlerDefiner<System>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> ExecutableDefinerExt for Twhere T: ExecutableDefiner,

source§

const fn start_with_bind<Binder, Func>(self, binder: Binder, func: Func) -> Twhere Func: FnBind<Binder, Output = ()>,

Use the specified function with dependency as the entry point of the executable object being defined.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.