Struct elipdotter::index::DocumentMap

source ·
pub struct DocumentMap { /* private fields */ }
Expand description

Map of documents and their Ids to quickly get name from id and vice versa.

Implementations§

source§

impl DocumentMap

source

pub fn new() -> Self

source

pub fn reserve_id(&mut self, name: impl Into<String> + AsRef<str>) -> Id

source

pub fn insert<'a>( &mut self, name: impl Into<String> + AsRef<str>, content: &str, provider: &mut impl Provider<'a> )

Alternatively, Self::reserve_id and then drop the lock, go to a different thread, and make a new Simple.