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§
Source§impl DefaultEncoding for Interrupt
impl DefaultEncoding for Interrupt
Source§type Encoding = TableEncoder
type Encoding = TableEncoder
Source§impl<'encoding> StructDecodeMetadata<'encoding, Resource> for Interrupt
impl<'encoding> StructDecodeMetadata<'encoding, Resource> for Interrupt
Source§const DECODERS: &'static [ErasedDecoderEntry] = _
const DECODERS: &'static [ErasedDecoderEntry] = _
Source§impl StructEncodeMetadata<Resource> for Interrupt
impl StructEncodeMetadata<Resource> for Interrupt
Source§const ENCODERS: &'static [ErasedEncoderEntry] = _
const ENCODERS: &'static [ErasedEncoderEntry] = _
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> MeshField for Twhere
T: DefaultEncoding,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshField for Twhere
T: DefaultEncoding,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
Source§impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
Source§impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
Source§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
MessageEncode::compute_message_size
.Source§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
MessageEncode::write_message
.