|
iceberg-cpp
|
Conversion utilities for primitive types. More...
#include <conversions.h>
Static Public Member Functions | |
| static Result< std::vector< uint8_t > > | ToBytes (const PrimitiveType &type, const Literal::Value &value) |
| Serializes a raw literal value into a byte vector according to its type. | |
| static Result< std::vector< uint8_t > > | ToBytes (const Literal &literal) |
| Serializes a complete Literal object into a byte vector. | |
| static Result< Literal::Value > | FromBytes (const PrimitiveType &type, std::span< const uint8_t > data) |
| Deserializes a span of bytes into a raw literal value based on the given type. | |
| static Result< Literal > | FromBytes (std::shared_ptr< PrimitiveType > type, std::span< const uint8_t > data) |
| Deserializes a span of bytes into a complete Literal object. | |
Conversion utilities for primitive types.
|
static |
Deserializes a span of bytes into a raw literal value based on the given type.
| type | The target primitive type to interpret the bytes as. |
| data | A std::span of bytes representing the serialized value. |
|
static |
Deserializes a span of bytes into a complete Literal object.
| type | A shared pointer to the target primitive type. |
| data | A std::span of bytes representing the serialized value. |
|
static |
Serializes a raw literal value into a byte vector according to its type.
| type | The primitive type of the value. |
| value | The std::variant holding the raw literal value to serialize. |