Expand description
General basic key-value structs for Key-Value based storages.
Modules§
- bytes
- re-export
bytes
crate. - iterator
- Iterator trait
- raw_
pointer - Unsafe raw pointer for
Key
,Value
,Entry
Structs§
- Encoded
Value - EncodedValue contains the data need to be stored in Bytes.
- Entry
- Entry provides Key, Value, UserMeta and ExpiresAt. This struct can be used by the user to set data.
- Header
- Header is used in value log as a header before Entry.
- Key
- A general Key for key-value storage, the underlying is u8 slice.
- KeyMut
- A general mutable Key for key-value storage, the underlying is u8 slice.
- KeyRef
- KeyRef can only contains a underlying u8 slice of Key
- OP
- Values have their first byte being byteData or byteDelete. This helps us distinguish between a key that has never been seen and a key that has been explicitly deleted.
- Overflow
- Uvariant overflows a 64-bit integer
- Value
- Value represents the value info that can be associated with a key, but also the internal Meta field. The data in the Value is not mutable.
- Value
Mut - ValueMut represents the value info that can be associated with a key, but also the internal Meta field. The data in the ValueMut is mutable.
- Value
Ref - ValueRef contains a
&'a Value
Constants§
- EXPIRATION_
OFFSET - The position store expires_at in a encoded value
- MAX_
HEADER_ SIZE - Maximum possible size of the header. The maximum size of header struct will be 18 but the maximum size of variant encoded header will be 21.
- META_
OFFSET - The position store meta in a encoded value
- USER_
META_ OFFSET - The position store user meta in a encoded value
Traits§
- KeyExt
- Extensions for Key
- KeyMut
Ext - Extensions for
KeyMut
- Value
Ext - Extensions for
Value
- Value
MutExt - Extensions for
ValueMut
Functions§
- compare_
key - Checks the key without timestamp and checks the timestamp if keyNoTs
is same.
a
would be sorted higher than aa if we use bytes.compare All keys should have timestamp. - same_
key - Checks for key equality ignoring the version timestamp.