pub struct Interrupt { /* private fields */ }
Expand description
An object representing an interrupt-like signal to notify the guest of device activity.
This is generally an edge-triggered interrupt, but it could also be a synic event or similar notification.
The interrupt can be backed by a [pal_event::Event
], a
[mesh::Cell<pal_event::Event>
], or a function. In the former two cases, the
Interrupt
can be sent across a mesh channel to remote processes.
Implementations§
Source§impl Interrupt
impl Interrupt
Sourcepub fn from_event(event: Event) -> Self
pub fn from_event(event: Event) -> Self
Creates an interrupt from an event.
The event will be signaled when Self::deliver
is called.
Sourcepub fn from_cell(cell: Cell<Event>) -> Self
pub fn from_cell(cell: Cell<Event>) -> Self
Creates an interrupt from a mesh cell containing an event.
The current event will be signaled when Self::deliver
is called. The event
can be transparently changed without interaction from the caller.
Sourcepub fn from_fn<F>(f: F) -> Self
pub fn from_fn<F>(f: F) -> Self
Creates an interrupt from a function.
The function will be called when Self::deliver
is called. This type of
interrupt cannot be sent to a remote process.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Interrupt
impl !RefUnwindSafe for Interrupt
impl Send for Interrupt
impl Sync for Interrupt
impl Unpin for Interrupt
impl !UnwindSafe for Interrupt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> MeshField for T
impl<T> MeshField for T
§impl<T> MeshPayload for T
impl<T> MeshPayload for T
§impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
MessageEncode::compute_message_size
].§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
MessageEncode::write_message
].