[][src]Struct elasticlunr::document_store::DocumentStore

pub struct DocumentStore {
    pub save: bool,
    pub docs: BTreeMap<String, BTreeMap<String, String>>,
    pub doc_info: BTreeMap<String, BTreeMap<String, usize>>,
    pub length: usize,
}

The document store saves the complete text of each item saved to the index, if enabled. Most users do not need to use this type directly.

Fields

save: booldocs: BTreeMap<String, BTreeMap<String, String>>doc_info: BTreeMap<String, BTreeMap<String, usize>>length: usize

Methods

impl DocumentStore[src]

pub fn new(save: bool) -> Self[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn is_stored(&self) -> bool[src]

pub fn has_doc(&self, doc_ref: &str) -> bool[src]

pub fn add_doc(&mut self, doc_ref: &str, doc: BTreeMap<String, String>)[src]

pub fn get_doc(&self, doc_ref: &str) -> Option<BTreeMap<String, String>>[src]

pub fn remove_doc(&mut self, doc_ref: &str)[src]

pub fn add_field_length(&mut self, doc_ref: &str, field: &str, length: usize)[src]

pub fn get_field_length(&self, doc_ref: &str, field: &str) -> usize[src]

Trait Implementations

impl Clone for DocumentStore[src]

impl Debug for DocumentStore[src]

impl<'de> Deserialize<'de> for DocumentStore[src]

impl Serialize for DocumentStore[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<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.