Module keycode

Module keycode 

Source

Structs§

KeyDeserializer
KeySerializer
A builder for constructing binary keys using keycode encoding

Functions§

deserialize
Deserializes a key from a binary Keycode representation (Descending order)
deserialize_index_id
Deserialize an IndexId from database key bytes Expects [type_byte, …id_bytes]
deserialize_source_id
Deserialize a SourceId from database key bytes Expects [type_byte, …id_bytes] where type_byte is 0x01 for Table, 0x02 for View, 0x03 for TableVirtual, 0x04 for RingBuffer, 0x05 for Flow
encode_bool
Encode a bool value for keycode (true=0x00, false=0x01 for descending order)
encode_bytes
Encode bytes for keycode (escape 0xff, terminate with 0xffff)
encode_f32
Encode an f32 value for keycode
encode_f64
Encode an f64 value for keycode
encode_i8
Encode an i8 value for keycode (flip sign bit, then NOT)
encode_i16
Encode an i16 value for keycode (flip sign bit, then NOT)
encode_i32
Encode an i32 value for keycode (flip sign bit, then NOT)
encode_i64
Encode an i64 value for keycode (flip sign bit, then NOT)
encode_i128
Encode an i128 value for keycode (flip sign bit, then NOT)
encode_u8
Encode a u8 value for keycode (bitwise NOT)
encode_u16
Encode a u16 value for keycode (bitwise NOT of big-endian)
encode_u32
Encode a u32 value for keycode (bitwise NOT of big-endian)
encode_u64
Encode a u64 value for keycode (bitwise NOT of big-endian)
encode_u128
Encode a u128 value for keycode (bitwise NOT of big-endian)
serialize
Serializes a key to a binary Keycode representation (Descending order)
serialize_index_id
Serialize an IndexId for use in database keys Returns [type_byte, …id_bytes]
serialize_source_id
Serialize a SourceId for use in database keys Returns [type_byte, …id_bytes] where type_byte is 0x01 for Table, 0x02 for View, 0x03 for TableVirtual, 0x04 for RingBuffer, 0x05 for Flow