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]

[src]

Initialize a handle backed by ZX_HANDLE_INVALID, the only safe non-handle.

[src]

If a raw handle is obtained from some other source, this method converts it into a type-safe owned handle.

[src]

[src]

Trait Implementations

impl From<Channel> for Handle
[src]

[src]

Performs the conversion.

impl From<Event> for Handle
[src]

[src]

Performs the conversion.

impl From<EventPair> for Handle
[src]

[src]

Performs the conversion.

impl From<Fifo> for Handle
[src]

[src]

Performs the conversion.

impl Debug for Handle
[src]

[src]

Formats the value using the given formatter.

impl Eq for Handle
[src]

impl PartialEq for Handle
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Hash for Handle
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

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

impl AsHandleRef for Handle
[src]

[src]

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

[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

[src]

Set and clear userspace-accessible signal bits on an object. Wraps the zx_object_signal syscall. Read more

[src]

Waits on a handle. Wraps the zx_object_wait_one syscall. Read more

[src]

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]

[src]

Duplicate a handle, possibly reducing the rights available. Wraps the zx_handle_duplicate syscall. Read more

[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

[src]

Converts the value into its inner handle. Read more

[src]

Converts the handle into it's raw representation. Read more

[src]

Creates an instance of this type from a handle. Read more

[src]

Creates an instance of another handle-based type from this value's inner handle.

[src]

Creates an instance of this type from the inner handle of another handle-based type. Read more

impl Drop for Handle
[src]

[src]

Executes the destructor for this type. Read more

impl From<Job> for Handle
[src]

[src]

Performs the conversion.

impl From<Port> for Handle
[src]

[src]

Performs the conversion.

impl From<Process> for Handle
[src]

[src]

Performs the conversion.

impl From<Socket> for Handle
[src]

[src]

Performs the conversion.

impl From<Timer> for Handle
[src]

[src]

Performs the conversion.

impl From<Thread> for Handle
[src]

[src]

Performs the conversion.

impl From<Vmo> for Handle
[src]

[src]

Performs the conversion.