Struct magenta::Handle [] [src]

pub struct Handle(_);

An object representing a Magenta 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]

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

Trait Implementations

impl Debug for Handle
[src]

Formats the value using the given formatter.

impl Eq for Handle
[src]

impl PartialEq for Handle
[src]

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

This method tests for !=.

impl Hash for Handle
[src]

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

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

impl AsHandleRef for Handle
[src]

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

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

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

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

Causes packet delivery on the given port when the object changes state and matches signals. mx_object_wait_async syscall. Read more

impl HandleBased for Handle
[src]

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

Create a replacement for a handle, possibly reducing the rights available. This invalidates the original handle. Wraps the mx_handle_replace syscall. Read more

impl Drop for Handle
[src]

A method called when the value goes out of scope. Read more