|
Action Engine
|
ActionEngine chunk.
This structure is used to store a chunk of data in the ActionEngine format. It includes fields for metadata, a reference to the data, and the actual data itself. Data can be either a reference or the actual data, but not both.
#include <actionengine/data/types.h>
Public Member Functions | |
| bool | IsNull () const |
Public Attributes | |
| std::optional< ChunkMetadata > | metadata |
| std::string | ref |
| std::string | data |
|
nodiscard |
Checks if the chunk is null.
A chunk is considered null if it has no data and its metadata mimetype is set explicitly to kMimetypeBytes (indicating that it contains no meaningful data, disambiguating it from a chunk that has no data but may have logical meaning for the application in the context of a particular mimetype).
| std::string act::Chunk::data |
The inline data in the chunk.
This is a (raw byte) string that contains the actual data of the chunk. It is used when the data is small enough to be sent directly in the chunk. If this field is set, the ref field should be empty.
| std::optional<ChunkMetadata> act::Chunk::metadata |
The metadata associated with the chunk.
This includes the mimetype and timestamp of the chunk.
| std::string act::Chunk::ref |
A reference to the data in the chunk.
This is a string that can be used to reference the data in an external storage system, such as a database, object store, or file system. It is used when the data is too large to be sent directly in the chunk. If this field is set, the data field should be empty.