Crate facet_msgpack

Source
Expand description

Facet logo - a reflection library for Rust

Coverage Status free of syn crates.io documentation MIT/Apache-2.0 licensed

Logo by Misiasart

Thanks to all individual and corporate sponsors, without whom this work could not exist:

Ko-fi GitHub Sponsors Patreon Zed Depot

Provides MessagePack serialization and deserialization for Facet types.

§License

Licensed under either of:

at your option.

Enums§

DecodeError
Errors that can occur during MessagePack encoding/decoding operations

Constants§

MSGPACK_ARRAY16
Array format family - Represents arrays of arbitrary values Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-array
MSGPACK_ARRAY32
Array format for arrays with between 2^16 and 2^32-1 elements (0xdd)
MSGPACK_BIN8
Binary format family - Represents byte arrays Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-bin
MSGPACK_BIN16
Binary format for arrays between 2^8 and 2^16-1 bytes (0xc5)
MSGPACK_BIN32
Binary format for arrays between 2^16 and 2^32-1 bytes (0xc6)
MSGPACK_EXT8
Extension format family - Represents custom type information with byte arrays Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-ext
MSGPACK_EXT16
Extension format for data between 2^8 and 2^16-1 bytes (0xc8)
MSGPACK_EXT32
Extension format for data between 2^16 and 2^32-1 bytes (0xc9)
MSGPACK_FALSE
Boolean format family - Represents true/false values Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-bool
MSGPACK_FIXARRAY_MAX
Maximum value for fixarray format (0x9f, allowing arrays up to 15 elements)
MSGPACK_FIXARRAY_MIN
Fixarray format family - Represents arrays with up to 15 elements in a compact format The first 4 bits are 1001, and the remaining 4 bits store the length Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-array
MSGPACK_FIXEXT1
Fixed-size extension format family - Represents custom type information with fixed-size byte arrays Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-ext
MSGPACK_FIXEXT2
Fixed-size 2-byte extension format (0xd5)
MSGPACK_FIXEXT4
Fixed-size 4-byte extension format (0xd6)
MSGPACK_FIXEXT8
Fixed-size 8-byte extension format (0xd7)
MSGPACK_FIXEXT16
Fixed-size 16-byte extension format (0xd8)
MSGPACK_FIXMAP_MAX
Maximum value for fixmap format (0x8f, allowing maps up to 15 key-value pairs)
MSGPACK_FIXMAP_MIN
Fixmap format family - Represents maps with up to 15 key-value pairs in a compact format The first 4 bits are 1000, and the remaining 4 bits store the length Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-map
MSGPACK_FIXSTR_MAX
Maximum value for fixstr format (0xbf, allowing strings up to 31 bytes)
MSGPACK_FIXSTR_MIN
Fixstr format family - Represents strings up to 31 bytes in a compact format The first 3 bits are 101, and the remaining 5 bits store the length Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-str
MSGPACK_FLOAT32
Float format family - Represents IEEE 754 floating point numbers Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-float
MSGPACK_FLOAT64
Double precision floating point number format (0xcb)
MSGPACK_INT8
Signed integer format family - Represents signed integers Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#int-format-family
MSGPACK_INT16
16-bit signed integer format (0xd1)
MSGPACK_INT32
32-bit signed integer format (0xd2)
MSGPACK_INT64
64-bit signed integer format (0xd3)
MSGPACK_MAP16
Map format family - Represents key-value maps Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-map
MSGPACK_MAP32
Map format for maps with between 2^16 and 2^32-1 key-value pairs (0xdf)
MSGPACK_NEGFIXINT_MAX
Maximum value for negative fixint format (-0x01 = -1)
MSGPACK_NEGFIXINT_MIN
Negative fixint format family - Represents negative integers from -1 to -32 in a single byte The first 3 bits are 111, and the remaining 5 bits store the absolute value minus 1 Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#int-format-family
MSGPACK_NIL
MessagePack type tags As defined in the MessagePack specification: https://github.com/msgpack/msgpack/blob/master/spec.md Nil format - Represents nil/null values Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-nil
MSGPACK_POSFIXINT_MAX
Maximum value for positive fixint format (0x7f = 127)
MSGPACK_POSFIXINT_MIN
Positive fixint format family - Represents positive integers from 0 to 127 in a single byte The first bit is 0, and the remaining 7 bits store the value Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#int-format-family
MSGPACK_STR8
String format family - Represents UTF-8 string Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#formats-str
MSGPACK_STR16
String format for strings between 2^8 and 2^16-1 bytes (0xda)
MSGPACK_STR32
String format for strings between 2^16 and 2^32-1 bytes (0xdb)
MSGPACK_TRUE
Boolean true value in MessagePack format (0xc3)
MSGPACK_UINT8
Unsigned integer format family - Represents unsigned integers Ref: https://github.com/msgpack/msgpack/blob/master/spec.md#int-format-family
MSGPACK_UINT16
16-bit unsigned integer format (0xcd)
MSGPACK_UINT32
32-bit unsigned integer format (0xce)
MSGPACK_UINT64
64-bit unsigned integer format (0xcf)

Functions§

from_slice
Deserializes MessagePack-encoded data into a type that implements Facet.
from_slice_value
Deserializes MessagePack-encoded data into a Facet value.
from_strDeprecated
Alias for from_slice for backward compatibility
to_vec
Serializes any Facet type to MessagePack bytes