Struct Interrupt
pub struct Interrupt<K = RealInterruptKind, T = BootTimeline>(/* private fields */);Expand description
An object representing a Zircon interrupt.
As essentially a subtype of NullableHandle, it can be freely interconverted.
Implementations§
§impl<K, T> Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
impl<K, T> Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
pub fn bind_port(&self, port: &Port, key: u64) -> Result<(), Status>
pub fn bind_port(&self, port: &Port, key: u64) -> Result<(), Status>
Bind the given port with the given key.
Wraps zx_interrupt_bind.
pub fn ack(&self) -> Result<(), Status>
pub fn ack(&self) -> Result<(), Status>
Acknowledge the interrupt.
Wraps zx_interrupt_ack.
pub fn raw_handle(&self) -> u32
pub fn raw_handle(&self) -> u32
Return the handle’s integer value.
pub fn into_raw(self) -> u32
pub fn into_raw(self) -> u32
Return the raw handle’s integer value without closing it when self is dropped.
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
Returns a HandleRef referring to this handle.
pub fn duplicate(&self, rights: Rights) -> Result<Interrupt<K, T>, Status>
pub fn duplicate(&self, rights: Rights) -> Result<Interrupt<K, T>, Status>
Wraps the
zx_handle_duplicate
syscall.
pub fn replace(self, rights: Rights) -> Result<Interrupt<K, T>, Status>
pub fn replace(self, rights: Rights) -> Result<Interrupt<K, T>, Status>
Wraps the
zx_handle_replace
syscall.
pub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
pub fn wait_one(
&self,
signals: Signals,
deadline: Instant<MonotonicTimeline>,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
pub fn wait_async(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
Wraps the
zx_object_wait_async
syscall.
pub fn get_name(&self) -> Result<Name, Status>
pub fn get_name(&self) -> Result<Name, Status>
Wraps a call to the
zx_object_get_property
syscall for the ZX_PROP_NAME property.
pub fn set_name(&self, name: &Name) -> Result<(), Status>
pub fn set_name(&self, name: &Name) -> Result<(), Status>
Wraps a call to the
zx_object_set_property
syscall for the ZX_PROP_NAME property.
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_BASIC topic.
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_COUNT topic.
§impl<T> Interrupt<VirtualInterruptKind, T>where
T: InterruptTimeline,
impl<T> Interrupt<VirtualInterruptKind, T>where
T: InterruptTimeline,
pub fn create_virtual() -> Result<Interrupt<VirtualInterruptKind, T>, Status>
pub fn create_virtual() -> Result<Interrupt<VirtualInterruptKind, T>, Status>
Create a virtual interrupt.
Wraps zx_interrupt_create.
Trait Implementations§
§impl<K, T> AsHandleRef for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
impl<K, T> AsHandleRef for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
§fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
object_wait_many.§impl<K> AsRef<Interrupt<K>> for OnInterrupt<K>where
K: InterruptKind,
impl<K> AsRef<Interrupt<K>> for OnInterrupt<K>where
K: InterruptKind,
Source§impl CompatFrom<Interrupt> for Interrupt
Available on crate feature fuchsia only.
impl CompatFrom<Interrupt> for Interrupt
fuchsia only.Source§fn compat_from(value: Interrupt) -> Interrupt
fn compat_from(value: Interrupt) -> Interrupt
value into a value of this type.Source§impl<E, K, T> Encode<WireInterrupt, E> for Interrupt<K, T>
impl<E, K, T> Encode<WireInterrupt, E> for Interrupt<K, T>
Source§fn encode(
self,
encoder: &mut E,
out: &mut MaybeUninit<WireInterrupt>,
constraint: <WireInterrupt as Constrained>::Constraint,
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut E, out: &mut MaybeUninit<WireInterrupt>, constraint: <WireInterrupt as Constrained>::Constraint, ) -> Result<(), EncodeError>
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<E, K, T> EncodeOption<WireOptionalInterrupt, E> for Interrupt<K, T>
impl<E, K, T> EncodeOption<WireOptionalInterrupt, E> for Interrupt<K, T>
Source§fn encode_option(
this: Option<Interrupt<K, T>>,
encoder: &mut E,
out: &mut MaybeUninit<WireOptionalInterrupt>,
constraint: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<Interrupt<K, T>>, encoder: &mut E, out: &mut MaybeUninit<WireOptionalInterrupt>, constraint: (), ) -> Result<(), EncodeError>
§impl<K, T> From<Interrupt<K, T>> for NullableHandlewhere
K: InterruptKind,
T: Timeline,
impl<K, T> From<Interrupt<K, T>> for NullableHandlewhere
K: InterruptKind,
T: Timeline,
§fn from(x: Interrupt<K, T>) -> NullableHandle
fn from(x: Interrupt<K, T>) -> NullableHandle
§impl<K, T> From<NullableHandle> for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
impl<K, T> From<NullableHandle> for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
§fn from(handle: NullableHandle) -> Interrupt<K, T>
fn from(handle: NullableHandle) -> Interrupt<K, T>
Source§impl<K, T> FromWire<WireInterrupt> for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
impl<K, T> FromWire<WireInterrupt> for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
Source§fn from_wire(wire: WireInterrupt) -> Interrupt<K, T>
fn from_wire(wire: WireInterrupt) -> Interrupt<K, T>
wire to this type.Source§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl<K, T> FromWireOption<WireOptionalInterrupt> for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
impl<K, T> FromWireOption<WireOptionalInterrupt> for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
Source§fn from_wire_option(wire: WireOptionalInterrupt) -> Option<Interrupt<K, T>>
fn from_wire_option(wire: WireOptionalInterrupt) -> Option<Interrupt<K, T>>
wire to an option of this type.§impl<K, T> HandleBased for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
impl<K, T> HandleBased for Interrupt<K, T>where
K: InterruptKind,
T: Timeline,
§fn duplicate_handle(&self, rights: Rights) -> Result<Self, Status>
fn duplicate_handle(&self, rights: Rights) -> Result<Self, Status>
§fn replace_handle(self, rights: Rights) -> Result<Self, Status>
fn replace_handle(self, rights: Rights) -> Result<Self, Status>
§fn into_handle(self) -> NullableHandle
fn into_handle(self) -> NullableHandle
§fn from_handle(handle: NullableHandle) -> Self
fn from_handle(handle: NullableHandle) -> Self
§fn into_handle_based<H>(self) -> Hwhere
H: HandleBased,
fn into_handle_based<H>(self) -> Hwhere
H: HandleBased,
§fn from_handle_based<H>(h: H) -> Selfwhere
H: HandleBased,
fn from_handle_based<H>(h: H) -> Selfwhere
H: HandleBased,
fn is_invalid_handle(&self) -> bool
§impl<K, T> Ord for Interrupt<K, T>
impl<K, T> Ord for Interrupt<K, T>
§impl<K, T> PartialOrd for Interrupt<K, T>where
K: PartialOrd,
T: PartialOrd,
impl<K, T> PartialOrd for Interrupt<K, T>where
K: PartialOrd,
T: PartialOrd,
impl<K, T> Eq for Interrupt<K, T>
impl<K, T> StructuralPartialEq for Interrupt<K, T>
Auto Trait Implementations§
impl<K, T> Freeze for Interrupt<K, T>
impl<K, T> RefUnwindSafe for Interrupt<K, T>where
K: RefUnwindSafe,
T: RefUnwindSafe,
impl<K, T> Send for Interrupt<K, T>
impl<K, T> Sync for Interrupt<K, T>
impl<K, T> Unpin for Interrupt<K, T>
impl<K, T> UnwindSafe for Interrupt<K, T>where
K: UnwindSafe,
T: UnwindSafe,
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
§impl<T> EncodableAsHandle for Twhere
T: HandleBased,
impl<T> EncodableAsHandle for Twhere
T: HandleBased,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T, W> FromWireOption<WireBox<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<WireBox<'_, W>> for Twhere
T: FromWire<W>,
Source§fn from_wire_option(wire: WireBox<'_, W>) -> Option<T>
fn from_wire_option(wire: WireBox<'_, W>) -> Option<T>
wire to an option of this type.Source§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to Self