Struct fuchsia_zircon::Handle
[−]
[src]
pub struct Handle(_);
An object representing a Zircon handle.
Internally, it is represented as a 32-bit integer, but this wrapper enforces
strict ownership semantics. The Drop
implementation closes the handle.
This type represents the most general reference to a kernel object, and can be interconverted to and from more specific types. Those conversions are not enforced in the type system; attempting to use them will result in errors returned by the kernel. These conversions don't change the underlying representation, but do change the type and thus what operations are available.
Methods
impl Handle
[src]
fn invalid() -> Handle
[src]
Initialize a handle backed by ZX_HANDLE_INVALID, the only safe non-handle.
unsafe fn from_raw(raw: zx_handle_t) -> Handle
[src]
If a raw handle is obtained from some other source, this method converts it into a type-safe owned handle.
fn is_invalid(&self) -> bool
[src]
fn replace(self, rights: Rights) -> Result<Handle, Status>
[src]
Trait Implementations
impl From<Channel> for Handle
[src]
impl From<Event> for Handle
[src]
impl From<EventPair> for Handle
[src]
impl From<Fifo> for Handle
[src]
impl Debug for Handle
[src]
impl Eq for Handle
[src]
impl PartialEq for Handle
[src]
fn eq(&self, __arg_0: &Handle) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Handle) -> bool
[src]
This method tests for !=
.
impl Hash for Handle
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl AsHandleRef for Handle
[src]
fn as_handle_ref(&self) -> HandleRef
[src]
Get a reference to the handle. One important use of such a reference is for object_wait_many
. Read more
fn raw_handle(&self) -> zx_handle_t
[src]
Interpret the reference as a raw handle (an integer type). Two distinct handles will have different raw values (so it can perhaps be used as a key in a data structure). Read more
fn signal_handle(
&self,
clear_mask: Signals,
set_mask: Signals
) -> Result<(), Status>
[src]
&self,
clear_mask: Signals,
set_mask: Signals
) -> Result<(), Status>
Set and clear userspace-accessible signal bits on an object. Wraps the zx_object_signal syscall. Read more
fn wait_handle(
&self,
signals: Signals,
deadline: Time
) -> Result<Signals, Status>
[src]
&self,
signals: Signals,
deadline: Time
) -> Result<Signals, Status>
Waits on a handle. Wraps the zx_object_wait_one syscall. Read more
fn wait_async_handle(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts
) -> Result<(), Status>
[src]
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts
) -> Result<(), Status>
Causes packet delivery on the given port when the object changes state and matches signals. zx_object_wait_async syscall. Read more
impl HandleBased for Handle
[src]
fn duplicate_handle(&self, rights: Rights) -> Result<Self, Status>
[src]
Duplicate a handle, possibly reducing the rights available. Wraps the zx_handle_duplicate syscall. Read more
fn replace_handle(self, rights: Rights) -> Result<Self, Status>
[src]
Create a replacement for a handle, possibly reducing the rights available. This invalidates the original handle. Wraps the zx_handle_replace syscall. Read more
fn into_handle(self) -> Handle
[src]
Converts the value into its inner handle. Read more
fn into_raw(self) -> zx_handle_t
[src]
Converts the handle into it's raw representation. Read more
fn from_handle(handle: Handle) -> Self
[src]
Creates an instance of this type from a handle. Read more
fn into_handle_based<H: HandleBased>(self) -> H
[src]
Creates an instance of another handle-based type from this value's inner handle.
fn from_handle_based<H: HandleBased>(h: H) -> Self
[src]
Creates an instance of this type from the inner handle of another handle-based type. Read more