#[non_exhaustive]pub enum Event<'a, Ctx, M: MessageDeserialize> {
Message {
ctx: &'a mut Ctx,
message: M::Reader<'a>,
sender: &'a mut ChannelSender,
handle_id: HandleId,
},
Interrupt {
interrupt: &'a mut Interrupt,
ctx: &'a mut Ctx,
},
Error(Error),
}
Expand description
Events that applications need to handle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Message
A received message.
Fields
§
ctx: &'a mut Ctx
The per-object state associated with the channel object.
§
sender: &'a mut ChannelSender
The channel where the message is received.
Interrupt
A received hardware interrupts.
Fields
§
ctx: &'a mut Ctx
The per-object state associated with the interrupt object.
Error(Error)
An error occurred when processing events.
Trait Implementations§
Auto Trait Implementations§
impl<'a, Ctx, M> Freeze for Event<'a, Ctx, M>
impl<'a, Ctx, M> RefUnwindSafe for Event<'a, Ctx, M>
impl<'a, Ctx, M> Send for Event<'a, Ctx, M>
impl<'a, Ctx, M> Sync for Event<'a, Ctx, M>
impl<'a, Ctx, M> Unpin for Event<'a, Ctx, M>
impl<'a, Ctx, M> !UnwindSafe for Event<'a, Ctx, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more