pub enum IndexValue {
I64(i64),
F64(f64),
Str(Vec<u8>),
}Expand description
One indexed scalar. Ordering is total within a type; the catalog guarantees a segment only ever holds one variant.
Variants§
I64(i64)
TYPE i64.
F64(f64)
TYPE f64 (never NaN — coercion rejects it).
Str(Vec<u8>)
TYPE str (raw bytes, memcmp order).
Implementations§
Source§impl IndexValue
impl IndexValue
Sourcepub fn coerce(ty: ValType, raw: &[u8]) -> Option<IndexValue>
pub fn coerce(ty: ValType, raw: &[u8]) -> Option<IndexValue>
Coerce raw field bytes per the declared type. None = the row
is excluded from the index (and counted as a coerce failure).
Sourcepub fn parse_literal(ty: ValType, raw: &[u8]) -> Option<IndexValue>
pub fn parse_literal(ty: ValType, raw: &[u8]) -> Option<IndexValue>
Parse a query-side literal (same rules as Self::coerce).
Sourcepub fn approx_bytes(&self) -> usize
pub fn approx_bytes(&self) -> usize
Approximate heap bytes (for the memory formula / IDX.LIST).
Trait Implementations§
Source§impl Clone for IndexValue
impl Clone for IndexValue
Source§fn clone(&self) -> IndexValue
fn clone(&self) -> IndexValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexValue
impl Debug for IndexValue
impl Eq for IndexValue
Source§impl Ord for IndexValue
impl Ord for IndexValue
Source§fn cmp(&self, other: &IndexValue) -> Ordering
fn cmp(&self, other: &IndexValue) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for IndexValue
impl PartialEq for IndexValue
Source§fn eq(&self, other: &IndexValue) -> bool
fn eq(&self, other: &IndexValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for IndexValue
impl PartialOrd for IndexValue
impl StructuralPartialEq for IndexValue
Auto Trait Implementations§
impl Freeze for IndexValue
impl RefUnwindSafe for IndexValue
impl Send for IndexValue
impl Sync for IndexValue
impl Unpin for IndexValue
impl UnsafeUnpin for IndexValue
impl UnwindSafe for IndexValue
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