|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
A reference to a (slice of a) logical node, in lieu of inline data. More...
#include <cpp/a11/data/types.h>
Public Member Functions | |
| size_t | ApproxBytes () const |
| Estimate memory/wire weight for bounded-buffer accounting. | |
| std::string | DebugString () const |
| Return a concise representation suitable for logs and diagnostics. | |
| absl::Status | Validate () const |
| Validate the referenced node id and requested slice. | |
| absl::StatusOr< Bytes > | ToMsgpack () const |
| Encodes this reference as MessagePack bytes. | |
Static Public Member Functions | |
| static absl::StatusOr< NodeRef > | FromMsgpack (std::string_view bytes) |
Decodes MessagePack bytes into a NodeRef. | |
Public Attributes | |
| std::string | id |
| Id of the referenced node. | |
| std::uint32_t | offset = 0 |
| Byte offset into the referenced node. | |
| std::optional< std::uint64_t > | length |
| Optional length of the window. | |
Friends | |
| bool | operator== (const NodeRef &, const NodeRef &)=default |
| template<typename Sink > | |
| void | AbslStringify (Sink &sink, const NodeRef &value) |
A reference to a (slice of a) logical node, in lieu of inline data.
Lets a fragment point at content held by another node – optionally a window of it – rather than copying the bytes.
| size_t a11::data::NodeRef::ApproxBytes | ( | ) | const |
Estimate memory/wire weight for bounded-buffer accounting.
| std::string a11::data::NodeRef::DebugString | ( | ) | const |
Return a concise representation suitable for logs and diagnostics.
|
static |
Decodes MessagePack bytes into a NodeRef.
| absl::StatusOr< Bytes > a11::data::NodeRef::ToMsgpack | ( | ) | const |
Encodes this reference as MessagePack bytes.
| absl::Status a11::data::NodeRef::Validate | ( | ) | const |
Validate the referenced node id and requested slice.
| std::string a11::data::NodeRef::id |
Id of the referenced node.
| std::optional<std::uint64_t> a11::data::NodeRef::length |
Optional length of the window.
| std::uint32_t a11::data::NodeRef::offset = 0 |
Byte offset into the referenced node.