Modules§
Structs§
- FullKey
FullKey
is an internal concept in storage. It associatesUserKey
with an epoch.- Full
KeyTracker - TODO: Temporary bypass full key check. Remove this field after #15099 is resolved.
- Table
Key TableKey
is an internal concept in storage. It’s a wrapper around the key directly from the user, to make the code clearer and avoid confusion with encodedUserKey
andFullKey
.- UserKey
UserKey
is is an internal concept in storage. In the storage interface, user specifiestable_key
andtable_id
(inReadOptions
orWriteOptions
) as the input. The storage will group these two values into one struct for convenient filtering.
Constants§
Statics§
- EMPTY_
BYTES 🔒 - EMPTY_
VEC 🔒
Traits§
Functions§
- bound_
table_ key_ range - Bound table key range with table id to generate a new user key range.
- end_
bound_ of_ prefix - Get the end bound of the given
prefix
when transforming it to a key range. - end_
bound_ of_ vnode Unbounded
if the vnode is the maximum representable value (i.e. [VirtualNode::MAX_REPRESENTABLE
]), otherwiseExcluded
the next vnode.- gen_
key_ from_ bytes - gen_
key_ from_ str - get_
table_ id - Extract table id from encoded
FullKey
- get_
user_ key - Extract encoded
UserKey
from encodedFullKey
but allow empty slice - is_
empty_ key_ range - key_
with_ epoch - Converts user key to full key by appending
epoch
to the user key. - map_
table_ key_ range - next_
epoch - compute the next epoch, and don’t change the bytes of the u8 slice.
- next_
full_ key - compute the next full key of the given full key
- next_
key - Computes the next key of the given key.
- next_
key_ 🔒no_ alloc - prefix_
slice_ with_ vnode - prefixed_
range_ with_ vnode - Prepend the
prefix
to the given keyrange
. - prev_
epoch - compute the prev epoch, and don’t change the bytes of the u8 slice.
- prev_
full_ key - compute the prev full key of the given full key
- prev_
key - Computes the previous key of the given key.
- range_
of_ prefix - Transform the given
prefix
to a key range. - split_
key_ epoch - Splits a full key into its user key part and epoch part.
- start_
bound_ of_ excluded_ prefix - Get the start bound of the given
prefix
when it is excluded from the range. - table_
key - Extract table key from encoded
UserKey
without table id part - user_
key - Extract encoded
UserKey
from encodedFullKey
without epoch part - vnode
- Ensure there is only one vnode involved in table key range and return the vnode.
- vnode_
range - Returns left inclusive and right exclusive vnode index of the given range.