Struct magenta::Fifo [] [src]

pub struct Fifo(_);

An object representing a Magenta fifo.

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

Methods

impl Fifo
[src]

Create a pair of fifos and return their endpoints. Writing to one endpoint enqueues an element into the fifo from which the opposing endpoint reads. Wraps the mx_fifo_create syscall.

Attempts to write some number of elements into the fifo. The number of bytes written will be rounded down to a multiple of the fifo's element size. Return value (on success) is number of elements actually written.

Wraps mx_fifo_write.

Attempts to read some number of elements out of the fifo. The number of bytes read will always be a multiple of the fifo's element size. Return value (on success) is number of elements actually read.

Wraps mx_fifo_read.

Trait Implementations

impl Debug for Fifo
[src]

Formats the value using the given formatter.

impl Eq for Fifo
[src]

impl PartialEq for Fifo
[src]

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

This method tests for !=.

impl AsHandleRef for Fifo
[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 From<Handle> for Fifo
[src]

Performs the conversion.

impl Into<Handle> for Fifo
[src]

Performs the conversion.

impl HandleBased for Fifo
[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