pub struct DocumentStore {
pub save: bool,
pub docs: BTreeMap<String, BTreeMap<String, String>>,
pub doc_info: BTreeMap<String, BTreeMap<String, usize>>,
pub length: usize,
}
Expand description
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: bool
§docs: BTreeMap<String, BTreeMap<String, String>>
§doc_info: BTreeMap<String, BTreeMap<String, usize>>
§length: usize
Implementations§
Source§impl DocumentStore
impl DocumentStore
pub fn new(save: bool) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_stored(&self) -> bool
pub fn has_doc(&self, doc_ref: &str) -> bool
pub fn add_doc(&mut self, doc_ref: &str, doc: BTreeMap<String, String>)
pub fn get_doc(&self, doc_ref: &str) -> Option<BTreeMap<String, String>>
pub fn remove_doc(&mut self, doc_ref: &str)
pub fn add_field_length(&mut self, doc_ref: &str, field: &str, length: usize)
pub fn get_field_length(&self, doc_ref: &str, field: &str) -> usize
Trait Implementations§
Source§impl Clone for DocumentStore
impl Clone for DocumentStore
Source§fn clone(&self) -> DocumentStore
fn clone(&self) -> DocumentStore
Returns a copy of the value. Read more
1.0.0 · 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 DocumentStore
impl Debug for DocumentStore
Source§impl<'de> Deserialize<'de> for DocumentStore
impl<'de> Deserialize<'de> for DocumentStore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DocumentStore
impl RefUnwindSafe for DocumentStore
impl Send for DocumentStore
impl Sync for DocumentStore
impl Unpin for DocumentStore
impl UnwindSafe for DocumentStore
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