Descriptive metadata attached to a a11::data::Chunk.
More...
#include <cpp/a11/data/types.h>
|
| 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 metadata before it crosses a store or transport boundary.
|
| |
| absl::StatusOr< std::string > | GetAttribute (std::string_view key) const |
| | Returns attribute key, or a NotFound error when absent.
|
| |
| absl::Status | SetAttribute (std::string key, std::string value) |
| | Sets attribute key to value.
|
| |
| absl::StatusOr< Bytes > | ToMsgpack () const |
| | Encodes this metadata as MessagePack bytes.
|
| |
|
| std::string | mimetype |
| | Media type of the chunk payload.
|
| |
| std::optional< absl::Time > | timestamp {} |
| | Optional creation timestamp.
|
| |
| ByteMap | attributes {} |
| | Free-form key/value attributes.
|
| |
Descriptive metadata attached to a a11::data::Chunk.
Carries the payload's mimetype, an optional timestamp, and a bag of free-form attributes. The mimetype may embed a serialization type tag (see a11::data::SerializationRegistry).
◆ ApproxBytes()
| size_t a11::data::ChunkMetadata::ApproxBytes |
( |
| ) |
const |
Estimate memory/wire weight for bounded-buffer accounting.
◆ DebugString()
| std::string a11::data::ChunkMetadata::DebugString |
( |
| ) |
const |
Return a concise representation suitable for logs and diagnostics.
◆ FromMsgpack()
| absl::StatusOr< ChunkMetadata > a11::data::ChunkMetadata::FromMsgpack |
( |
std::string_view |
bytes | ) |
|
|
static |
◆ GetAttribute()
| absl::StatusOr< std::string > a11::data::ChunkMetadata::GetAttribute |
( |
std::string_view |
key | ) |
const |
Returns attribute key, or a NotFound error when absent.
◆ SetAttribute()
| absl::Status a11::data::ChunkMetadata::SetAttribute |
( |
std::string |
key, |
|
|
std::string |
value |
|
) |
| |
Sets attribute key to value.
◆ ToMsgpack()
| absl::StatusOr< Bytes > a11::data::ChunkMetadata::ToMsgpack |
( |
| ) |
const |
Encodes this metadata as MessagePack bytes.
◆ Validate()
| absl::Status a11::data::ChunkMetadata::Validate |
( |
| ) |
const |
Validate metadata before it crosses a store or transport boundary.
◆ AbslStringify
◆ operator==
◆ attributes
| ByteMap a11::data::ChunkMetadata::attributes {} |
Free-form key/value attributes.
◆ mimetype
| std::string a11::data::ChunkMetadata::mimetype |
Media type of the chunk payload.
◆ timestamp
| std::optional<absl::Time> a11::data::ChunkMetadata::timestamp {} |
Optional creation timestamp.
The documentation for this struct was generated from the following files: