|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
One piece of a node's stream: an inline chunk or a node reference. More...
#include <cpp/a11/data/types.h>
Public Member Functions | |
| size_t | ApproxBytes () const |
| Estimate memory/wire weight for session and transport limits. | |
| std::string | DebugString () const |
| Return a concise representation suitable for logs and diagnostics. | |
| absl::Status | Validate () const |
| Validate the node id, payload, sequence, and continuation marker. | |
| absl::StatusOr< Chunk *absl_nonnull > | GetChunk () |
| Returns the held Chunk, or an error when it holds a NodeRef. | |
| absl::StatusOr< const Chunk *absl_nonnull > | GetChunk () const |
| Returns the held Chunk, or an error when it holds a NodeRef. | |
| absl::StatusOr< NodeRef *absl_nonnull > | GetNodeRef () |
| Returns the held NodeRef, or an error when it holds a Chunk. | |
| absl::StatusOr< const NodeRef *absl_nonnull > | GetNodeRef () const |
| Returns the held NodeRef, or an error when it holds a Chunk. | |
| absl::StatusOr< Bytes > | ToMsgpack () const |
| Encodes this fragment as MessagePack bytes. | |
Static Public Member Functions | |
| static absl::StatusOr< NodeFragment > | FromMsgpack (std::string_view bytes) |
Decodes MessagePack bytes into a NodeFragment. | |
Public Attributes | |
| std::string | id |
| Id of the node this fragment belongs to. | |
| std::variant< Chunk, NodeRef > | data = Chunk{} |
| Inline chunk or reference. | |
| std::optional< std::uint32_t > | seq |
| Ordering sequence number. | |
| bool | continued = false |
| Whether further fragments follow this one. | |
Friends | |
| bool | operator== (const NodeFragment &, const NodeFragment &)=default |
| template<typename Sink > | |
| void | AbslStringify (Sink &sink, const NodeFragment &value) |
One piece of a node's stream: an inline chunk or a node reference.
Fragments are how data flows through a named node. Each targets a node by id and carries either a Chunk or a NodeRef. seq orders fragments within the node and continued marks that more fragments follow (the stream is not yet complete).
| size_t a11::data::NodeFragment::ApproxBytes | ( | ) | const |
Estimate memory/wire weight for session and transport limits.
| std::string a11::data::NodeFragment::DebugString | ( | ) | const |
Return a concise representation suitable for logs and diagnostics.
|
static |
Decodes MessagePack bytes into a NodeFragment.
| absl::StatusOr< Chunk *absl_nonnull > a11::data::NodeFragment::GetChunk | ( | ) |
| absl::StatusOr< const Chunk *absl_nonnull > a11::data::NodeFragment::GetChunk | ( | ) | const |
| absl::StatusOr< NodeRef *absl_nonnull > a11::data::NodeFragment::GetNodeRef | ( | ) |
| absl::StatusOr< const NodeRef *absl_nonnull > a11::data::NodeFragment::GetNodeRef | ( | ) | const |
| absl::StatusOr< Bytes > a11::data::NodeFragment::ToMsgpack | ( | ) | const |
Encodes this fragment as MessagePack bytes.
| absl::Status a11::data::NodeFragment::Validate | ( | ) | const |
Validate the node id, payload, sequence, and continuation marker.
|
friend |
| std::string a11::data::NodeFragment::id |
Id of the node this fragment belongs to.
| std::optional<std::uint32_t> a11::data::NodeFragment::seq |
Ordering sequence number.