class OwnedEncodeResult
Defined at line 269 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_types.h
|OwnedEncodeResult| holds a message encoded for writing, along with the
required storage.
When holding encode results of wire domain objects, |OwnedEncodeResult|
will try not to heap allocate when the encoded message size is small.
For this reason, it is not moveable to prevent expensive byte copies.
Public Methods
::fidl::OutgoingMessage & message ()
The message encoded for writing, or an error.
Before using the message, one should first check it for encoding errors:
fidl::OwnedEncodeResult result = fidl::StandaloneEncode(...);
if (!result.message().ok()) {
// Handle errors...
fidl::Error error = result.message().error();
}
Note that as an optimization, handle types and rights are not validated.
Validation happens when writing to the transport. To proactively perform
validation, consult |OutgoingToEncodedMessage|.
Defined at line 284 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_types.h
::fidl::WireFormatMetadata wire_format_metadata ()
The format and revision of the encoded FIDL message.
Defined at line 287 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_types.h
template <typename T, typename... Args>
void OwnedEncodeResult (std::in_place_type_t<T> tag, Args &&... args)
Defined at line 292 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/wire_types.h