Crate fuchsia_zircon [] [src]

Type-safe bindings for Zircon kernel syscalls.

Structs

Channel

An object representing a Zircon channel.

Event

An object representing a Zircon event object.

EventPair

An object representing a Zircon event pair.

Fifo

An object representing a Zircon fifo.

Handle

An object representing a Zircon handle.

HandleRef

A borrowed reference to a Handle.

Job

An object representing a Zircon job.

MessageBuf

A buffer for receiving messages from a channel.

Packet

A packet sent through a port. This is a type-safe wrapper for zx_port_packet_t.

Port

An object representing a Zircon port.

Process

An object representing a Zircon process.

SignalPacket

Contents of a signal packet (one generated by the kernel). This is a type-safe wrapper for zx_packet_signal_t.

Socket

An object representing a Zircon socket.

Thread

An object representing a Zircon thread.

Timer

An object representing a Zircon event pair.

UserPacket

Contents of a user packet (one sent by port_queue). This is a type-safe wrapper for zx_packet_user_t.

Vmo

An object representing a Zircon virtual memory object.

WaitItem

A "wait item" containing a handle reference and information about what signals to wait on, and, on return from object_wait_many, which are pending.

Enums

ChannelOpts

Options for creating a channel.

ClockId

An identifier to select a particular clock. See zx_time_get for more information about the possible values.

EventOpts

Options for creating an event object.

EventPairOpts

Options for creating an event pair.

FifoOpts

Options for creating a fifo pair.

PacketContents

The contents of a Packet.

PortOpts

Options for creating a port.

SocketOpts

Options for creating a socket pair.

SocketReadOpts

Options for reading from a socket.

SocketWriteOpts

Options for writing into a socket.

Status

A status code returned from the Zircon kernel.

TimerOpts

Options for creating a timer.

VmoCloneOpts
VmoOp
VmoOpts

Options for creating virtual memory objects. None supported yet.

WaitAsyncOpts

Options for wait_async.

Constants

ZX_CHANNEL_PEER_CLOSED
ZX_CHANNEL_READABLE
ZX_CHANNEL_WRITABLE
ZX_CPRNG_ADD_ENTROPY_MAX_LEN
ZX_CPRNG_DRAW_MAX_LEN
ZX_EPAIR_CLOSED
ZX_EPAIR_SIGNALED
ZX_EVENT_SIGNALED
ZX_RIGHT_DEBUG
ZX_RIGHT_DUPLICATE
ZX_RIGHT_EXECUTE
ZX_RIGHT_GET_PROPERTY
ZX_RIGHT_MAP
ZX_RIGHT_NONE
ZX_RIGHT_READ
ZX_RIGHT_SAME_RIGHTS
ZX_RIGHT_SET_PROPERTY
ZX_RIGHT_TRANSFER
ZX_RIGHT_WRITE
ZX_SIGNAL_HANDLE_CLOSED
ZX_SIGNAL_LAST_HANDLE
ZX_SIGNAL_NONE
ZX_SOCKET_PEER_CLOSED
ZX_SOCKET_READABLE
ZX_SOCKET_WRITABLE
ZX_TASK_TERMINATED
ZX_TIMER_SIGNALED
ZX_TIME_INFINITE
ZX_USER_SIGNAL_0
ZX_USER_SIGNAL_1
ZX_USER_SIGNAL_2
ZX_USER_SIGNAL_3
ZX_USER_SIGNAL_4
ZX_USER_SIGNAL_5
ZX_USER_SIGNAL_6
ZX_USER_SIGNAL_7

Traits

AsHandleRef

A trait to get a reference to the underlying handle of an object.

Cookied

A trait implemented by all handles for objects which can have a cookie attached.

HandleBased

A trait implemented by all handle-based types.

Peered

A trait implemented by all handles for objects which have a peer.

Functions

cprng_add_entropy

Mix the given entropy into the kernel CPRNG.

cprng_draw

Draw random bytes from the kernel's CPRNG to fill the given buffer. Returns the actual number of bytes drawn, which may sometimes be less than the size of the buffer provided.

deadline_after

Compute a deadline for the time in the future that is the given Duration away.

nanosleep

Sleep until the given deadline.

object_wait_many

Wait on multiple handles. The success return value is a bool indicating whether one or more of the provided handle references was closed during the wait.

size_to_u32_sat
ticks_get

Read the number of high-precision timer ticks since boot. These ticks may be processor cycles, high speed timer, profiling timer, etc. They are not guaranteed to continue advancing when the system is asleep.

ticks_per_second

Return the number of high-precision timer ticks in a second.

time_get

Get the current time, from the specific clock id.

usize_into_u32

Type Definitions

Rights

Rights associated with a handle.

Signals

Signals that can be waited upon.