class Data

Defined at line 65 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

Binary data that might be stored inline or in a VMO.

Useful for performance-sensitive protocols that sometimes receive small

amounts of binary data (i.e., which is more efficient to provide using

`bytes`) but also need to support arbitrary amounts of data (i.e., which

need to be provided out-of-line in a `Buffer`).

Public Members

static const fidl_type_t * FidlType

Public Methods

void Data ()
void Data (Data && )
Data WithBytes (::std::vector<uint8_t> && )
Data WithBuffer (::fuchsia::mem::Buffer && )
::std::unique_ptr<Data> New ()
void Encode (::fidl::Encoder * encoder, size_t offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, Data * value, size_t offset)
zx_status_t Clone (Data * result)
Data & SetUnknownData (fidl_xunion_tag_t ordinal, std::vector<uint8_t> bytes, std::vector<zx::handle> handles)
bool has_invalid_tag ()

Defined at line 93 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

bool is_bytes ()

Defined at line 97 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

::std::vector<uint8_t> & bytes ()

The binary data provided inline in the message.

Defined at line 100 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

const ::std::vector<uint8_t> & bytes ()

The binary data provided inline in the message.

Defined at line 106 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

bool is_buffer ()

Defined at line 112 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

::fuchsia::mem::Buffer & buffer ()

The binary data provided out-of-line in a `Buffer`.

Defined at line 115 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

const ::fuchsia::mem::Buffer & buffer ()

The binary data provided out-of-line in a `Buffer`.

Defined at line 121 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

::fuchsia::mem::Data::Tag Which ()

Defined at line 128 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

fidl_xunion_tag_t Ordinal ()

You probably want to use Which() method instead of Ordinal(). Use Ordinal() only when you need

access to the raw integral ordinal value.

Defined at line 141 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

const std::vector<uint8_t> * UnknownBytes ()

Defined at line 144 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

const std::vector<zx::handle> * UnknownHandles ()

Defined at line 150 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

void ~Data ()
Data & operator= (Data && )
Data & set_bytes (::std::vector<uint8_t> value)
Data & set_buffer (::fuchsia::mem::Buffer value)

Enumerations

enum Tag
Name Value
kUnknown 0
kBytes 1
kBuffer 2
Invalid ::std::numeric_limits<::fidl_union_tag_t>::max()

Defined at line 78 of file fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fidl.h

Friends

class Equality