[][src]Struct tantivy::fastfield::FastFieldReader

pub struct FastFieldReader<Item: FastValue> { /* fields omitted */ }

Trait for accessing a fastfield.

Depending on the field type, a different fast field is required.

Methods

impl<Item: FastValue> FastFieldReader<Item>[src]

pub fn open(data: ReadOnlySource) -> Self[src]

Opens a fast field given a source.

pub fn get(&self, doc: DocId) -> Item[src]

Return the value associated to the given document.

This accessor should return as fast as possible.

Panics

May panic if doc is greater than the segment

pub fn get_range(&self, start: DocId, output: &mut [Item])[src]

Fills an output buffer with the fast field values associated with the DocId going from start to start + output.len().

Regardless of the type of Item, this method works

  • transmuting the output array
  • extracting the Items as if they were u64
  • possibly converting the u64 value to the right type.

Panics

May panic if start + output.len() is greater than the segment's maxdoc.

pub fn min_value(&self) -> Item[src]

Returns the minimum value for this fast field.

The max value does not take in account of possible deleted document, and should be considered as an upper bound of the actual maximum value.

pub fn max_value(&self) -> Item[src]

Returns the maximum value for this fast field.

The max value does not take in account of possible deleted document, and should be considered as an upper bound of the actual maximum value.

Trait Implementations

impl<Item: FastValue> From<Vec<Item>> for FastFieldReader<Item>[src]

impl<Item: Clone + FastValue> Clone for FastFieldReader<Item>[src]

Auto Trait Implementations

impl<Item> Send for FastFieldReader<Item>

impl<Item> Sync for FastFieldReader<Item>

impl<Item> Unpin for FastFieldReader<Item> where
    Item: Unpin

impl<Item> !UnwindSafe for FastFieldReader<Item>

impl<Item> !RefUnwindSafe for FastFieldReader<Item>

Blanket Implementations

impl<T> Fruit for T where
    T: Send + Downcast
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]