pub trait KeySegmentation<const KEY_LEN: usize>:
Copy
+ Clone
+ Debug {
const SEGMENTS: [usize; KEY_LEN];
}Expand description
This trait is used to segment keys stored in the PATCH. The segmentation is used to determine sub-fields of the key, allowing for segment based operations, like counting the number of elements in a segment with a given prefix without traversing the tree.
Note that the segmentation is defined on the shared key ordering, and should thus be only implemented once, independent of additional key orderings.
See TribleSegmentation for an example that segments keys into entity, attribute, and value segments.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.