Skip to main content

Msi

Struct Msi 

pub struct Msi(/* private fields */);
Expand description

An object representing a Zircon Message Signaled Interrupt (MSI).

As essentially a subtype of NullableHandle, it can be freely interconverted.

Implementations§

§

impl Msi

pub fn raw_handle(&self) -> u32

Return the handle’s integer value.

pub fn invalid() -> Msi

pub fn is_invalid(&self) -> bool

pub fn into_raw(self) -> u32

Return the raw handle’s integer value without closing it when self is dropped.

pub fn unowned(&self) -> Unowned<'_, Msi>

Returns an [Unowned] referring to this handle.

pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>

Returns a [HandleRef] referring to this handle.

pub fn duplicate_handle(&self, rights: Rights) -> Result<Msi, Status>

Wraps the zx_handle_duplicate syscall.

pub fn replace_handle(self, rights: Rights) -> Result<Msi, Status>

Wraps the zx_handle_replace syscall.

pub fn into_handle(self) -> NullableHandle

Converts the value into its inner handle.

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

Wraps the zx_object_wait_one syscall.

pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>

Wraps the zx_object_wait_async syscall.

pub fn wait_item(&self, signals: Signals) -> WaitItem<'_>

Return a WaitItem for this handle and the provided signals to use with object_wait_many.

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>

Wraps a call to the zx_object_set_property syscall for the ZX_PROP_NAME property.

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>

Wraps the zx_object_get_info syscall for the ZX_INFO_HANDLE_COUNT topic.

pub fn koid(&self) -> Result<Koid, Status>

Returns the [Koid] for the object referred to by this handle.

Trait Implementations§

§

impl AsHandleRef for Msi

§

fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>

Get a reference to the handle. One important use of such a reference is for object_wait_many.
§

impl Debug for Msi

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<Handle> for Msi

§

fn from(handle: Handle) -> Msi

Converts to this type from the input type.
§

impl From<Msi> for NullableHandle

§

fn from(x: Msi) -> NullableHandle

Converts to this type from the input type.
§

impl From<NullableHandle> for Msi

§

fn from(handle: NullableHandle) -> Msi

Converts to this type from the input type.
§

impl Hash for Msi

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for Msi

§

fn cmp(&self, other: &Msi) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Msi

§

fn eq(&self, other: &Msi) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Msi

§

fn partial_cmp(&self, other: &Msi) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl TryFrom<Msi> for Handle

§

type Error = Status

The type returned in the event of a conversion error.
§

fn try_from(x: Msi) -> Result<Handle, <Handle as TryFrom<Msi>>::Error>

Performs the conversion.
§

impl Eq for Msi

§

impl StructuralPartialEq for Msi

Auto Trait Implementations§

§

impl Freeze for Msi

§

impl RefUnwindSafe for Msi

§

impl Send for Msi

§

impl Sync for Msi

§

impl Unpin for Msi

§

impl UnsafeUnpin for Msi

§

impl UnwindSafe for Msi

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> InstanceFromServiceTransport<T> for T

Source§

fn from_service_transport(handle: T) -> T

Converts the given service transport handle of type T to Self
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<E> RunsTransport<Mpsc> for E

Source§

impl<E> RunsTransport<Mpsc> for E
where E: RunsTransport<Mpsc>,