Trait tantivy::fastfield::FastValue [−][src]
pub trait FastValue: Clone + Copy + Send + Sync + PartialOrd + 'static {
fn from_u64(val: u64) -> Self;
fn to_u64(&self) -> u64;
fn fast_field_cardinality(field_type: &FieldType) -> Option<Cardinality>;
fn as_u64(&self) -> u64;
fn to_type() -> Type;
fn make_zero() -> Self { ... }
}
Expand description
Trait for types that are allowed for fast fields: (u64, i64 and f64).
Required methods
Converts a value from u64
Internally all fast field values are encoded as u64.
Converts a value to u64.
Internally all fast field values are encoded as u64.
fn fast_field_cardinality(field_type: &FieldType) -> Option<Cardinality>
fn fast_field_cardinality(field_type: &FieldType) -> Option<Cardinality>
Returns the fast field cardinality that can be extracted from the given
FieldType
.
If the type is not a fast field, None
is returned.