Module fidl::encoding

source ·
Expand description

FIDL encoding and decoding.

Macros§

Structs§

  • A fake FIDL type that can encode from and decode into any Rust type.
  • Like Ambiguous1. There needs to be two of these types so that the compiler doesn’t infer one of them and generate a call to the panicking methods.
  • The FIDL type array<T, N>.
  • Bitflags type for transaction header at-rest flags.
  • The FIDL type string:N.
  • The FIDL type box<T>.
  • Context for encoding and decoding.
  • Decoding state
  • The default ResourceDialect. Encodes everything into a channel MessageBuf for sending via channels between Fuchsia services.
  • Bitflags type to flags that aid in dynamically identifying features of the request.
  • A FIDL type representing an empty payload (0 bytes).
  • The FIDL type used for an empty success variant in a result union. Result unions occur in two-way methods that are flexible or that use error syntax.
  • Encoding state
  • The body of a FIDL Epitaph
  • The FIDL union generated for flexible two-way methods with errors.
  • The FIDL union generated for flexible two-way methods without errors.
  • Box around an async channel. Needed to implement ResourceDialect for DefaultFuchsiaResourceDialect but not so useful for that case.
  • A struct which encodes as GenericMessageType<H, T> where E: Encode<T>.
  • The FIDL type for a message consisting of a header H and body T.
  • The FIDL type zx.Handle:<OBJECT_TYPE, RIGHTS>, or a client_end or server_end.
  • The FIDL type T:optional where T is a vector, string, handle, or client/server end.
  • The FIDL type T:optional where T is a union.
  • The FIDL union generated for strict two-way methods with errors.
  • Thread-local buffer for encoding and decoding FIDL transactions. Needed to implement ResourceDialect.
  • Header for transactional FIDL messages
  • The FIDL type vector<T>:N.

Enums§

  • An uninhabited type used as owned and borrowed type for ambiguous markers. Can be replaced by ! once that is stable.
  • Internal FIDL framework error type used to identify unknown methods.
  • The owned type for GenericMessageType.
  • Wire format version to use during encode / decode.

Constants§

Traits§

  • A Rust type that can be decoded from the FIDL type T.
  • Indicates a type is encodable as a handle in a given resource dialect.
  • A Rust type that can be encoded as the FIDL type T.
  • Handle disposition struct used for a particular dialect.
  • Handle type used for a particular dialect.
  • Handle info struct used for a particular dialect.
  • Message buffer used to hold a message in a particular dialect.
  • Trait for a “Box” that wraps a handle when it’s inside a client. Useful when we need some infrastructure to make our underlying channels work the way the client code expects.
  • Channel used for proxies in a particular dialect.
  • Describes how a given transport encodes resources like handles.
  • A FIDL resource type marker.
  • A FIDL type marker.
  • A FIDL value type marker.

Functions§

  • Decodes the transaction header from a message. Returns the header and a reference to the tail of the message.
  • Acquire a mutable reference to the thread-local buffers used for decoding.
  • Acquire a mutable reference to the thread-local buffers used for encoding.
  • Encodes the provided type into the thread-local encoding buffers.

Type Aliases§