pub enum TermOrder {
Bytewise,
Sparql,
}Expand description
Variants§
Bytewise
The bytes of the stored token.
Sparql
Kind, then the SPARQL ORDER BY order; see the module docs.
Implementations§
Source§impl TermOrder
impl TermOrder
Sourcepub fn probe(self, term: &[u8]) -> Probe<'_>
pub fn probe(self, term: &[u8]) -> Probe<'_>
Read term once, to compare stored tokens against it
(Probe::cmp_stored).
Sourcepub fn cmp(self, a: &[u8], b: &[u8]) -> Ordering
pub fn cmp(self, a: &[u8], b: &[u8]) -> Ordering
Compare two term tokens in this order. A total order: two tokens compare equal only when they are the same bytes. The empty slice sorts before everything (a chunk directory’s first key is empty).
Sourcepub fn separator(self, prev_last: &[u8], first: &[u8]) -> Vec<u8> ⓘ
pub fn separator(self, prev_last: &[u8], first: &[u8]) -> Vec<u8> ⓘ
A chunk directory’s routing key between two neighbouring chunks: a
short byte string k with prev_last < k <= first in this order.
Bytewise it is [crate::dict::shortest_separator]. In the SPARQL order
two IRIs get the shortest separator of their texts, written as an IRI
token; every other boundary keeps first whole.
Trait Implementations§
impl Copy for TermOrder
impl Eq for TermOrder
impl StructuralPartialEq for TermOrder
Auto Trait Implementations§
impl Forget for TermOrder
impl Freeze for TermOrder
impl Move for TermOrder
impl RefUnwindSafe for TermOrder
impl Send for TermOrder
impl Sync for TermOrder
impl Unpin for TermOrder
impl UnsafeUnpin for TermOrder
impl UnwindSafe for TermOrder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.