- formatType
void formatType(typeof(null) value, ubyte[DataSize!type] data)
void formatType(ubyte[DataSize!type] data)
void formatType(bool value, ubyte[DataSize!type] data)
void formatType(ubyte value, ubyte[DataSize!type] data)
void formatType(byte value, ubyte[DataSize!type] data)
void formatType(ushort value, ubyte[DataSize!type] data)
void formatType(uint value, ubyte[DataSize!type] data)
void formatType(ulong value, ubyte[DataSize!type] data)
void formatType(short value, ubyte[DataSize!type] data)
void formatType(int value, ubyte[DataSize!type] data)
void formatType(long value, ubyte[DataSize!type] data)
void formatType(float value, ubyte[DataSize!type] data)
void formatType(double value, ubyte[DataSize!type] data)
void formatType(ubyte length, ubyte[DataSize!type] data)
void formatType(ushort length, ubyte[DataSize!type] data)
void formatType(uint length, ubyte[DataSize!type] data)
void formatType(ubyte extType, ubyte[1] value, ubyte[DataSize!type] data)
void formatType(ubyte extType, ubyte[2] value, ubyte[DataSize!type] data)
void formatType(ubyte extType, ubyte[4] value, ubyte[DataSize!type] data)
void formatType(ubyte extType, ubyte[8] value, ubyte[DataSize!type] data)
void formatType(ubyte length, ubyte extType, ubyte[DataSize!type] data)
void formatType(ushort length, ubyte extType, ubyte[DataSize!type] data)
void formatType(ubyte extType, ubyte[16] value, ubyte[DataSize!type] data)
void formatType(uint length, ubyte extType, ubyte[DataSize!type] data)
Serialize a value to a certain type.
- getDataSize
size_t getDataSize(MsgpackType type)
Get serialized data size at runtime. DataSize!() should be preferred
if the type is known at compile time.
- getType
MsgpackType getType(ubyte value)
Look at the first byte of an object to determine the type.
- parseType
auto parseType(ubyte[DataSize!type] data)
ubyte[DataSize!type - 1] parseType(ubyte[DataSize!type] data)
Parses the MessagePack object with specified type.
- testExt
void testExt(T length, ubyte extType)
Undocumented in source. Be warned that the author may not have intended to support it.
- testFixExt
void testFixExt(ubyte extType, T value)
Undocumented in source. Be warned that the author may not have intended to support it.
- testFormat
void testFormat(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
- testFormatNoArg
void testFormatNoArg(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
A low-level pure @nogc and betterC MessagePack implementation.
Note: As this is a low-level implementation certain error checking a some handling of the MessagePack data format has to be done by the API user. The following conditions need to be ensured by the user:
Other size restrictions are automatically enforced by proper typing.
Requires only std.bitmanip for bigEndianToNative and nativeToBigEndian as external dependency.
TODO: Could try to avoid that dependency. This is only a compile time dependency anyway though, as these functions are templates and get inlined into this module.