[][src]Trait tantivy::fastfield::FastValue

pub trait FastValue: Default + Clone + Copy + Send + Sync + PartialOrd {
    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; }

Trait for types that are allowed for fast fields: (u64, i64 and f64).

Required methods

fn from_u64(val: u64) -> Self

Converts a value from u64

Internally all fast field values are encoded as u64.

fn to_u64(&self) -> u64

Converts a value to u64.

Internally all fast field values are encoded as u64.

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.

fn as_u64(&self) -> u64

Cast value to u64. The value is just reinterpreted in memory.

Loading content...

Implementations on Foreign Types

impl FastValue for u64[src]

impl FastValue for i64[src]

impl FastValue for f64[src]

Loading content...

Implementors

Loading content...