class WireEncoder

Defined at line 18 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

Public Methods

void WireEncoder (const CodingConfig * coding_config, zx_channel_iovec_t * iovecs, size_t iovec_capacity, fidl_handle_t * handles, fidl_handle_metadata_t * handle_metadata, size_t handle_capacity, uint8_t * backing_buffer, size_t backing_buffer_capacity)

|backing_buffer| points to a buffer region where the encoder will write

encoded bytes. Note that not all objects will be copied into |backing_buffer|

when iovec optimization is requested. For example, the encoder may fill an

|zx_channel_iovec_t| element pointing to the body of a |vector

<uint8

>|

as opposed to copying the content into |backing_buffer|.

Defined at line 11 of file ../../sdk/lib/fidl/cpp/wire/wire_encoder.cc

void EncodeHandle (fidl_handle_t handle, HandleAttributes attr, WirePosition position, bool is_optional)

Defined at line 25 of file ../../sdk/lib/fidl/cpp/wire/wire_encoder.cc

bool Alloc (size_t size, WirePosition * position)

Alloc allocates a new region in the buffer for an object of |size| bytes.

It has been optimized to be small in size so that it can be inlined.

|backing_buffer_next_| will be updated to point to the encoder buffer

address where the next future out of line object will go.

Returns true iff allocation succeeded.

Defined at line 37 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

void EncodeMemcpyableVector (const void * data, size_t count, size_t stride)

Use iovec optimizations to encode memcpyable vector bodies.

Defined at line 60 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

size_t CurrentLength ()

Defined at line 120 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

size_t CurrentHandleCount ()

Defined at line 121 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

void SetError (const char * error)

Defined at line 122 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

void SetError (zx_status_t status, const char * error)

Defined at line 130 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

bool HasError ()

Defined at line 137 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

fit::result<fidl::Error, Result> Finish ()

Defined at line 144 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_encoder.h

Records