[][src]Struct irq::Scope

pub struct Scope<'env, I: Interrupt> { /* fields omitted */ }

An interrupt scope created by the scope function.

Methods

impl<'env, I: Interrupt> Scope<'env, I>[src]

pub fn register(&self, interrupt: I, handler: &'env mut Handler<'env>)[src]

Registers an interrupt handler for the duration of this scope.

Once the enclosing scope call returns, all interrupts that were registered using this method will be deregistered again.

Parameters

  • interrupt: The interrupt to handle. This must be a variant of an enum generated by the scoped_interrupts! macro.
  • handler: The handler closure to hook up to the interrupt. For convenience, this can be created using the handler! macro.

Trait Implementations

impl<'env, I: Interrupt> Drop for Scope<'env, I>[src]

Auto Trait Implementations

impl<'env, I> Send for Scope<'env, I> where
    I: Send

impl<'env, I> Sync for Scope<'env, I> where
    I: Sync

impl<'env, I> Unpin for Scope<'env, I> where
    I: Unpin

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.