The top-level frame exchanged between two A11 endpoints.
More...
#include <cpp/a11/data/types.h>
|
| size_t | ApproxBytes () const |
| | Estimate memory/wire weight before admitting this message to a buffer.
|
| |
| std::string | DebugString () const |
| | Return a concise representation suitable for logs and diagnostics.
|
| |
| absl::Status | Validate () const |
| | Validate every contained fragment, action, and header.
|
| |
| absl::StatusOr< Bytes > | ToMsgpack () const |
| | Encodes this message as MessagePack bytes.
|
| |
| absl::Status | ToMsgpackInto (MsgpackWriter *absl_nonnull writer) const |
| | Append this record's fields to an already-open writer.
|
| |
|
| static constexpr std::uint32_t | kVersion = 1 |
| | Wire format version.
|
| |
The top-level frame exchanged between two A11 endpoints.
Batches any number of a11::data::NodeFragment payloads and a11::data::ActionMessage invocations together with connection-level headers into a single unit sent across a stream. A half-close message (see MakeHalfCloseMessage) is a WireMessage that signals the sender is done writing.
◆ ApproxBytes()
| size_t a11::data::WireMessage::ApproxBytes |
( |
| ) |
const |
Estimate memory/wire weight before admitting this message to a buffer.
◆ DebugString()
| std::string a11::data::WireMessage::DebugString |
( |
| ) |
const |
Return a concise representation suitable for logs and diagnostics.
◆ FromMsgpack()
| absl::StatusOr< WireMessage > a11::data::WireMessage::FromMsgpack |
( |
std::string_view |
bytes | ) |
|
|
static |
◆ ToMsgpack()
| absl::StatusOr< Bytes > a11::data::WireMessage::ToMsgpack |
( |
| ) |
const |
Encodes this message as MessagePack bytes.
◆ ToMsgpackInto()
| absl::Status a11::data::WireMessage::ToMsgpackInto |
( |
MsgpackWriter *absl_nonnull |
writer | ) |
const |
Append this record's fields to an already-open writer.
What ToMsgpack() is built from, and what a parent record calls through MsgpackWriter::PackRecord so that nesting costs no buffer of its own. Both produce the same bytes; this one avoids the intermediate string.
Assumes the record is already valid. Validate() recurses through nested records, so validating here as well would re-check every nested id once per ancestor level. ToMsgpack() validates the whole tree once and then calls this; a caller reaching for this directly should do the same, and any caller that got its record from FromMsgpack() already has.
◆ Validate()
| absl::Status a11::data::WireMessage::Validate |
( |
| ) |
const |
Validate every contained fragment, action, and header.
◆ AbslStringify
template<typename Sink >
| void AbslStringify |
( |
Sink & |
sink, |
|
|
const WireMessage & |
value |
|
) |
| |
|
friend |
◆ operator==
◆ actions
◆ headers
| ByteMap a11::data::WireMessage::headers {} |
◆ kVersion
| constexpr std::uint32_t a11::data::WireMessage::kVersion = 1 |
|
staticconstexpr |
◆ node_fragments
| std::vector<NodeFragment> a11::data::WireMessage::node_fragments {} |
The documentation for this struct was generated from the following files: