|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
The local fast path: a value in a chunk, encoded only if needed. More...
#include <cpp/a11/data/serialization.h>
Public Member Functions | |
| TypedChunkObject (T value, std::string tag, std::string mimetype, std::shared_ptr< const SerializationRegistry > registry) | |
| std::string_view | tag () const override |
| The serialisation tag of the held type. | |
| std::string_view | mimetype () const override |
| The mimetype the value would be encoded as. | |
| const void *absl_nonnull | address () const override |
| An opaque address supplied by the object implementation. | |
| const T & | value () const |
| absl::StatusOr< Bytes > | Encode () const override |
| Encodes the value, for whoever needs bytes after all. | |
| size_t | ApproxBytes () const override |
| A size estimate that does not encode anything. | |
Public Member Functions inherited from a11::data::ChunkObject | |
| virtual | ~ChunkObject ()=default |
The local fast path: a value in a chunk, encoded only if needed.
MakeChunkObject() builds the chunk a producer puts on a node – with the value attached and no bytes – and TryTakeObject() is how a consumer in the same process gets the value back without either side encoding anything. A consumer elsewhere, or a store that persists, calls Chunk::Materialize() and gets exactly the bytes it always got.
The pair is templated in the caller's translation unit. A matching tag and concrete object type are both required before a value is copied out.
|
inline |
|
inlineoverridevirtual |
An opaque address supplied by the object implementation.
Implements a11::data::ChunkObject.
|
inlineoverridevirtual |
A size estimate that does not encode anything.
Implements a11::data::ChunkObject.
|
overridevirtual |
Encodes the value, for whoever needs bytes after all.
Implements a11::data::ChunkObject.
|
inlineoverridevirtual |
The mimetype the value would be encoded as.
Implements a11::data::ChunkObject.
|
inlineoverridevirtual |
The serialisation tag of the held type.
Implements a11::data::ChunkObject.
|
inline |