-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
Complete API documentation for muesli.
Core codec types for serializing different data types
-
int_codec— Codec for int values. -
long_codec— Codec for long values. -
long_long_codec— Codec for long long values. -
unsigned_int_codec— Codec for unsigned int values. -
unsigned_long_codec— Codec for unsigned long values. -
unsigned_long_long_codec— Codec for unsigned long long values. -
short_codec— Codec for short values. -
unsigned_short_codec— Codec for unsigned short values. -
float_codec— Codec for float values. -
double_codec— Codec for double values. -
long_double_codec— Codec for long double values. -
char_codec— Codec for char values. -
signed_char_codec— Codec for signed char values. -
unsigned_char_codec— Codec for unsigned char values. -
wchar_codec— Codec for wchar_t values. -
char8_codec— Codec for char8_t values. -
char16_codec— Codec for char16_t values. -
char32_codec— Codec for char32_t values. -
bool_codec— Codec for bool values. -
size_codec— Codec for std::size_t values. -
ptrdiff_codec— Codec for std::ptrdiff_t values. -
nullptr_codec— Codec for nullptr_t values. -
byte_codec— Codec for std::byte values. -
int8_codec— Codec for std::int8_t values. -
uint8_codec— Codec for std::uint8_t values. -
int16_codec— Codec for std::int16_t values. -
uint16_codec— Codec for std::uint16_t values. -
int32_codec— Codec for std::int32_t values. -
uint32_codec— Codec for std::uint32_t values. -
int64_codec— Codec for std::int64_t values. -
uint64_codec— Codec for std::uint64_t values. -
intmax_codec— Codec for the widest signed integer type (std::intmax_t). -
uintmax_codec— Codec for the widest unsigned integer type (std::uintmax_t). -
intptr_codec— Codec for pointer-sized signed integers (std::intptr_t). -
uintptr_codec— Codec for pointer-sized unsigned integers (std::uintptr_t).
-
delimited_codec— Codec for std::basic_string with configurable char traits and allocator. -
string_codec— Codec for std::string. -
wstring_codec— Codec for std::wstring. -
u8string_codec— Codec for std::u8string. -
u16string_codec— Codec for std::u16string. -
u32string_codec— Codec for std::u32string.
-
array_codec— Codec for fixed-size arrays. -
element_codec— Value type is a fixed-size array of element values -
next_codec— Returns the next codec in the encoding chain -
encode— Encodes an array as a range -
decode— Decodes a range back into a fixed-size array -
array_of— Helper function to create an array_codec with deduced element type -
range_codec— Codec for range-based iteration over encoded sequences. -
vector_codec— Codec for encoding/decoding std::vector containers -
vector_of— Helper function to create a vector_codec
-
tuple_codec— Codec for tuples of codecs. -
codecs— Value type is a tuple of all codec value types -
requires— Projects values from an owner object using each codec's projector -
pair_codec— Codec for std::pair that delegates to tuple_codec -
codec— Value type is a std::pair of the codec value types -
variant_codec— Codec for std::variant types.
-
make_nullable— Creates a nullable codec for smart pointers and optional-like types -
make_nullable_range— Creates a nullable codec that treats empty ranges as null -
optional_codec— Wraps a codec to encode/decode std::optional values -
constrain— Constrains this codec to reject null values
-
constant_codec— Codec for constant values with compile-time enforcement. -
constrained_codec— Codec for constrained values with validation predicates. -
move— The value type from the inner codec -
optional— Implementation of constrained_codec::optional() method -
delimiter_predicate— Element value type from the element codec -
decode_state— Internal state for decoding delimited ranges -
identity_codec— The simplest codec - passes values through unchanged
-
monostate_codec— Codec for std::monostate (empty variant state). -
unsigned_varint_codec— Codec for variable-length encoded unsigned integers (varint). -
signed_varint_codec— Codec for signed integers using zigzag encoding with variable-length encoding -
member_codec— Codec for extracting values from struct members. -
field_codec— Traits extracted from the member pointer -
project— Projects an owning object to extract the member value -
member_of— Helper function to create a member_codec -
projector_codec— Codec for projecting values from an owner type via custom lambda. -
projector_of— Helper function to create a projector_codec
Trait-based mixins that extend codecs with method chains
-
constrainable— Mixin providing . -
constructable— Mixin providing . -
apply— Creates an apply_codec targeting the specified type -
nullableable— Mixin providing . -
nullable— Wraps codec to support a nullable storage type -
optionable— Mixin providing . -
projectable— Mixin providing . -
member— Binds this codec to a member of a struct -
transformable— Mixin providing transformation methods (. -
transform— Applies bidirectional transformation to encode and decode -
transform_input— Transforms only during deserialisation (decode) -
transform_output— Transforms only during serialisation (encode)
Serialization format implementations
-
StreamPush— Concept for streams that support push operations for move-only types -
StreamPeekPop— Concept for streams that support peek and pop operations for move-only types -
OutputStream— Concept for output streams that can write values of type T -
InputStream— Concept for input streams that can read values of type T -
binary_format— Binary serialisation format for encoding/decoding codec values -
serialize— Serialises multiple values from an input stream to a byte output stream -
deserialize— Deserialises multiple values from a byte input stream to an output stream -
make_binary_format— Deduction guide for binary_format.
Type traits, concepts, and helper utilities
-
alignof— Helper constant for alignment, returns 0 for monostate -
variant_alignment— Trait to compute alignment of a variant type -
is_optional— Trait to detect std::optional types -
is_tuple— Trait to detect std::tuple types -
is_range_holder— Trait to detect range_holder types -
types— Value template to detect range_holder types -
is_move_only— Trait to detect move-only types (move constructible but not copy constructible) -
pointers— Value template to detect move-only types -
member_pointer_traits— Trait to extract owner and member types from pointers-to-members and member functions
-
is_variant— Trait to detect std::variant types -
bool— Value template for detecting std::variant types -
HasBoolConversion— Concept for types that can be converted to bool -
HasHasValue— Concept for types with a has_value() method -
HasOptionalValueCheck— Concept for optional-like types with value checking -
HasValueType— Concept for types with a value_type member -
HasNextCodec— Concept for codecs with a next_codec() method -
CanEncodeRvalue— Concept for codecs that can encode rvalue references -
CanEncodeConstRef— Concept for codecs that can encode const references -
CanDecodeRvalue— Concept for codecs that can decode rvalue references -
CanDecodeConstRef— Concept for codecs that can decode const references -
Codec— Main Codec concept - defines the encoding/decoding interface -
HasProjectToEncoded— Concept for types with a project() method that returns an encoded type -
HasProjectFromOwner— Concept for types with a project() method given an owner type -
has_tuple_get_range— Helper trait for checking tuple element access -
HasTupleGetUpTo— Concept for tuples that support get<0> through get -
HasNulloptConstructible— Concept for types constructible from std::nullopt -
is_constructible_from_all_variant_alternatives— Trait to check if type is constructible from all variant alternatives -
ConstructibleFromAllVariantAlternatives— Concept for types constructible from all alternatives in a variant -
HasTupleSize— Concept that detects presence of std::tuple_size specialisation
-
move_only_generator— Move-only generator function wrapper -
m_callable— Default-constructs an empty generator that throws if invoked until assigned -
operator— Deleted copy constructor to preserve move-only semantics -
range_holder— Holder for ranges that can be either owned or generated on-the-fly -
iterator— Iterator for range_holder supporting both span and generator modes -
m_span_it— Default constructor -
m_cached_value— Constructs a generator-backed iterator; optionally as end sentinel -
m_data— Deleted copy constructor to enforce move-only semantics -
end— Wraps a contiguous range by referencing its span (caller must keep it alive) -
begin— Iterator to the first element (throws if holder is invalid)