Crate fidl

Source
Expand description

Library and runtime for fidl bindings.

Re-exports§

pub use endpoints::MethodType;
pub use server::ServeInner;
pub use handle::*;

Modules§

client
An implementation of a client for a fidl interface.
encoding
FIDL encoding and decoding.
endpoints
Wrapper types for the endpoints of a connection.
epitaph
Epitaph support for Channel and AsyncChannel.
for_fidl_message_crate
This belongs in the //src/lib/fidl/rust/fidl_message crate, but has to go here to work around the “upstream crates may add a new impl of trait” error https://doc.rust-lang.org/error_codes/E0119.html.
handle
A portable representation of handle-like objects for fidl.
marker
Marker types supporting FIDL bindings.
prelude
A “prelude” of common FIDL traits, to be used like use fidl::prelude::*;.
server
An implementation of a server for a fidl interface.

Structs§

Instant
A timestamp from the kernel. Generic over both the timeline and the units it is measured in.
NsUnit
A marker type representing nanoseconds.
TicksUnit
A marker type representing system ticks.
WireMetadata
Header for RFC-0120 persistent FIDL messages.

Enums§

Error
The error type used by FIDL operations.
TransportError

Traits§

Persistable
Marker trait implemented for FIDL non-resource structs, tables, and unions. These can be used with the persistence API and standalone encoding/decoding API.
Standalone
Marker trait implemented for FIDL resource structs, tables, and unions. These can be used with the standalone encoding/decoding API, but not the persistence API.
Timeline
A marker trait for times to prevent accidental comparison between different timelines.

Functions§

persist
Encodes a FIDL object to bytes following RFC-0120. This only works on non-resource structs, tables, and unions. See unpersist for the reverse.
standalone_decode_resource
Decodes a FIDL object from bytes, handles, and wire metadata following RFC-0120. Must be a resource struct, table, or union.
standalone_decode_value
Decodes a FIDL object from bytes and wire metadata following RFC-0120. Must be a non-resource struct, table, or union.
standalone_encode_resource
Encodes a FIDL object to bytes, handles, and wire metadata following RFC-0120. Must be a resource struct, table, or union.
standalone_encode_value
Encodes a FIDL object to bytes and wire metadata following RFC-0120. Must be a non-resource struct, table, or union.
unpersist
Decodes a FIDL object from bytes following RFC-0120. Must be a non-resource struct, table, or union. See persist for the reverse.

Type Aliases§

BootInstant
A timestamp from the boot clock. Advances while the system is suspended.
BootTicks
A timestamp from system ticks on the boot timeline. Advances while the system is suspended.
MonotonicInstant
A timestamp from the monontonic clock. Does not advance while the system is suspended.
MonotonicTicks
A timestamp from system ticks on the monotonic timeline. Does not advance while the system is suspended.
Result
A specialized Result type for FIDL operations.
Ticks
A timestamp from system ticks. Has an arbitrary unit that can be measured with Ticks::per_second().