Struct fuchsia_zircon::Channel [] [src]

pub struct Channel(_);

An object representing a Zircon channel.

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

Methods

impl Channel
[src]

[src]

Create a channel, resulting an a pair of Channel objects representing both sides of the channel. Messages written into one maybe read from the opposite.

Wraps the zx_channel_create syscall.

[src]

Read a message from a channel. Wraps the zx_channel_read syscall.

If the MessageBuf lacks the capacity to hold the pending message, returns an Err with the number of bytes and number of handles needed. Otherwise returns an Ok with the result as usual.

[src]

Read a message from a channel.

Note that this method can cause internal reallocations in the MessageBuf if it is lacks capacity to hold the full message. If such reallocations are not desirable, use read_raw instead.

[src]

Write a message to a channel. Wraps the zx_channel_write syscall.

[src]

Send a message consisting of the given bytes and handles to a channel and await a reply. The bytes should start with a four byte 'txid' which is used to identify the matching reply.

Wraps the zx_channel_call syscall.

Note that unlike read, the caller must ensure that the MessageBuf has enough capacity for the bytes and handles which will be received, as replies which are too large are discarded.

On failure returns the both the main and read status.

Trait Implementations

impl Debug for Channel
[src]

[src]

Formats the value using the given formatter.

impl Eq for Channel
[src]

impl PartialEq for Channel
[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 Channel
[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 Channel
[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 From<Handle> for Channel
[src]

[src]

Performs the conversion.

impl HandleBased for Channel
[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 Peered for Channel
[src]

[src]

Set and clear userspace-accessible signal bits on the object's peer. Wraps the zx_object_signal_peer syscall. Read more

impl AsRef<Channel> for Channel
[src]

[src]

Performs the conversion.