Expand description
Type-safe bindings for Zircon kernel syscalls.
Modules§
Macros§
Structs§
- Address
Tagging Feature Flags - Boot
Timeline - A marker type for the system’s boot timeline which continues running during suspend.
- Bti
- An object representing a Zircon Bus Transaction Initiator object. See BTI Documentation for details.
- Channel
- An object representing a Zircon channel.
- Channel
IoSlice - A reference to a readable slice of memory for channel writes and calls, analogous to
std::io::IoSlice
but for Zircon channel I/O. ABI-compatible withzx_channel_iovec_t
, guaranteeing the pointed-to bytes are readable using lifetimes. - Clock
- An object representing a kernel clock, used to track the progress of time. A clock is a one-dimensional affine transformation of the clock monotonic reference timeline which may be atomically adjusted by a maintainer and observed by clients.
- Clock
Details - Fine grained details of a
Clock
object. - Clock
Opts - Clock
Transformation - A one-dimensional affine transformation that maps points from the reference timeline to the clock timeline. See clock transformations.
- Clock
Update - Specifies an update to zero or more properties of a clock. See [
Clock::update
] - Clock
Update Builder - Builder to specify how zero or more properties of a clock should be updated.
See [
Clock::update
]. - CpuFeature
Flags - Debug
Log - An object representing a Zircon ‘debuglog’ object.
- Debug
LogOpts - Debug
LogRecord - A record from the kernel’s debuglog.
- Duration
- Event
- An object representing a Zircon event object.
- Event
Pair - An object representing a Zircon event_pair
- Exception
- An object representing a Zircon exception object.
- Exception
Arch Data - x64-specific exception data.
- Exception
Channel Options - Options that may be used with
Task::create_exception_channel
- Exception
Report - Information about an exception that occurred in a process.
- Fifo
- An object representing a Zircon fifo.
- Futex
- A safe wrapper around zx_futex_t, generally called as part of higher-level synchronization primitives.
- GPAddr
- Wrapper type for guest physical addresses.
- Guest
- An object representing a Zircon guest
- Guest
Bell Packet - Contents of a guest bell packet generated by the kernel. This is a type-safe wrapper for zx_packet_guest_bell_t
- Guest
IoPacket - Contents of a guest I/O packet generated by the kernel. This is a type-safe wrapper for zx_packet_guest_io_t
- Guest
MemPacket - Contents of a guest memory packet generated by the kernel. This is a type-safe wrapper for zx_packet_guest_memory_t
- Guest
Vcpu Packet - Contents of a guest VCPU packet generated by the kernel. This is a type-safe wrapper for zx_packet_guest_vcpu_t
- Handle
- An object representing a Zircon handle.
- Handle
Basic Info - Basic information about a handle.
- Handle
Count Info - Handle
Disposition - Operation to perform on handles during write. ABI-compatible with
zx_handle_disposition_t
. - Handle
Info - Information on handles that were read.
- Instant
- A timestamp from the kernel. Generic over both the timeline and the units it is measured in.
- Interrupt
- An object representing a Zircon interrupt.
- Interrupt
Packet - Contents of an interrupt packet (one received because of an interrupt bound to this port). This is a type-safe wrapper for zx_packet_interrupt_t.
- Iob
- An object representing a Zircon IOBuffer.
- IobAccess
- IobOptions
- IobRegion
- IobRegion
Private Options - Iommu
- An object representing a Zircon iommu
- Iommu
Desc Dummy - Job
- An object representing a Zircon job.
- JobCritical
Options - Options that may be used by
Job::set_critical
. - JobInfo
- Koid
- MapInfo
- Ergonomic wrapper around
zx_info_maps_t
. - Mapping
Details - MemStats
- MemStats
Compression - MemStats
Extended - Memory
Stall - Message
Buf - A buffer for receiving messages from a channel.
- Message
BufEtc - A buffer for receiving messages from a channel.
- Monotonic
Timeline - A marker type for the system’s monotonic timeline which pauses during suspend.
- Name
- A wrapper around zircon name fields.
- NsUnit
- A marker type representing nanoseconds.
- Object
Type - Zircon object types.
- Packet
- A packet sent through a port. This is a type-safe wrapper for zx_port_packet_t.
- Pager
- An object representing a Zircon pager.
- Pager
Options - Options that may be used when creating a pager.
- Pager
Packet - Contents of a pager packet generated by the kernel. This is a type-safe wrapper for zx_packet_page_request_t
- Pager
Writeback Begin Options - PerCpu
Stats - Pmt
- An object representing a Zircon Pinned Memory Token. See PMT Documentation for details.
- Port
- An object representing a Zircon port.
- Port
Options - Options that may be used when creating a
Port
. - Power
Transition Packet - Contents of a power transition packet generated by the kernel. This is a type-safe wrapper for zx_packet_processor_power_level_transition_request_t
- Process
- An object representing a Zircon process.
- Process
Handle Stats - Process
Info - Process
Info Flags - Process
Options - Options that may be used when creating a
Process
. - Profile
- An object representing a Zircon profile.
- Property
- Object property types for use with [object_get_property()] and [object_set_property].
- Raise
Exception Options - Options that may be used with
Thread::raise_exception
- Resource
- An object representing a Zircon resource.
- Resource
Flag - Resource
Info - Resource
Kind - Rights
- Rights associated with a handle.
- Signal
Packet - Contents of a signal packet (one generated by the kernel). This is a type-safe wrapper for zx_packet_signal_t.
- Signals
- Signals that can be waited upon.
- Socket
- An object representing a Zircon socket
- Socket
Info - Socket
Opts - Socket
Read Opts - Socket
Write Opts - Status
- Status type indicating the result of a Fuchsia syscall.
- Stream
- An object representing a Zircon stream.
- Stream
Options - Stream
Read Options - Stream
Write Options - Synthetic
Timeline - A marker type representing a synthetic timeline defined by a kernel clock object.
- Task
Runtime Info - Task
Stats Info - Thread
- An object representing a Zircon thread.
- Thread
Info - Thread
Stats - Ticks
Unit - A marker type representing system ticks.
- Timer
- An object representing a Zircon timer, such as the one returned by zx_timer_create.
- Timer
Info - Topic
- Transfer
Data Options - Options that may be used when transferring data between VMOs.
- Unowned
- A borrowed value of type
T
. - Unspecified
Fifo Element - The default element for fifos, does not support reading or writing. Only used for IPC transfer.
- User
Packet - Contents of a user packet (one sent by
port_queue
). This is a type-safe wrapper for zx_packet_user_t. - Vcpu
- Virtual
Memory Feature Flags - Vmar
- An object representing a Zircon virtual memory address region.
- Vmar
Flags - Flags to VMAR routines which are considered safe.
- Vmar
Flags Extended - Flags to all VMAR routines.
- Vmar
Info - VmarOp
- VM Address Range opcodes
- Vmo
- An object representing a Zircon virtual memory object.
- VmoChild
Options - Options that may be used when creating a
Vmo
child. - VmoInfo
- Ergonomic equivalent of sys::zx_info_vmo_t. Must be ABI-compatible with it.
- VmoInfo
Flags - Flags that may be set when receiving info on a
Vmo
. - VmoOp
- VM Object opcodes
- VmoOptions
- Options that may be used when creating a
Vmo
. - Wait
Async Opts - Options for wait_async
- Wait
Item - 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§
- Access
Type - CSDefault
Operand Size - Represents the default operand size as specified by the CS descriptor.
- Cache
Policy - Channel
Read Result - Debug
LogSeverity - The severity a kernel log message can have.
- Exception
Channel Type - Exception
Type - The type of an exception observed.
- Feature
Kind - The types of system features that may be requested.
- Handle
Op - Handle operation.
- IobDiscipline
- IobRegion
Type - JobAction
- Represents the ZX_POL_ACTION_* constants
- JobCondition
- Represents the ZX_POL_* constants
- JobDefault
Timer Mode - Represents the ZX_TIMER_SLACK_* constants
- JobPolicy
- Holds a timer policy or a basic policy set for zx_job_set_policy
- JobPolicy
Option - Represents the ZX_JOB_POL_RELATIVE and ZX_JOB_POL_ABSOLUTE constants
- MapDetails
- MemAccess
Size - MemData
- Packet
Contents - The contents of a
Packet
. - PagerOp
- Policy
Code - Port
Access Size - Port
Data - Socket
Write Disposition - Write disposition to set on a zircon socket with zx_socket_set_disposition.
- Thread
Block Type - Thread
State - Vcpu
Contents
Traits§
- AsHandle
Ref - A trait to get a reference to the underlying handle of an object.
- Feature
Flags - Handle
Based - A trait implemented by all handle-based types.
- Peered
- A trait implemented by all handles for objects which have a peer.
- Task
- Time
Unit - A marker trait for times and durations to prevent accidental comparison between different units.
- Timeline
- A marker trait for times to prevent accidental comparison between different timelines.
Functions§
- cprng_
add_ entropy - Mix the given entropy into the kernel CPRNG.
- cprng_
draw - Draw random bytes from the kernel’s CPRNG to fill
buffer
. This function always fills the buffer. - cprng_
draw_ ⚠raw - Draw random bytes from the kernel’s CPRNG to fill the provided buffer. This function always fills the buffer.
- cprng_
draw_ uninit - Draw random bytes from the kernel’s CPRNG to fill
buffer
. This function always fills the buffer. - 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.
- ok
- Convenience re-export of
Status::ok
. - system_
get_ feature_ count - Get supported hardware capabilities counts.
- system_
get_ feature_ flags - Get supported hardware capabilities bitflags.
- system_
get_ num_ cpus - Get number of logical processors on the system.
- system_
get_ page_ size - Retrieve the system memory page size in bytes.
- system_
get_ physmem - Get the amount of physical memory on the system, in bytes.
- system_
get_ version_ string - Return a version string describing the system (kernel). This string never changes.
Type Aliases§
- Boot
Duration - A duration on the boot timeline.
- Boot
Duration Ticks - A duration between two system ticks boot timestamps.
- Boot
Instant - A timestamp from the boot clock. Advances while the system is suspended.
- Boot
Ticks - A timestamp from system ticks on the boot timeline. Advances while the system is suspended.
- Boot
Timer - A timer that measures its deadlines against the boot clock.
- Boot
Timer Info - Handle
Ref - Monotonic
Duration - A duration on the monotonic timeline.
- Monotonic
Duration Ticks - A duration between two system ticks monotonic timestamps.
- Monotonic
Instant - A timestamp from the monontonic clock. Does not advance while the system is suspended.
- Monotonic
Ticks - A timestamp from system ticks on the monotonic timeline. Does not advance while the system is suspended.
- Monotonic
Timer - A timer that measures its deadlines against the monotonic clock.
- Monotonic
Timer Info - Synthetic
Clock - Synthetic
Clock OnBoot - Synthetic
Duration - A duration from a user-defined clock with arbitrary behavior.
- Synthetic
Instant - A timestamp from a user-defined clock with arbitrary behavior.
- Synthetic
Timer Info - Ticks
- A timestamp from system ticks. Has an arbitrary unit that can be measured with
Ticks::per_second()
.