pub struct AsyncIndex { /* private fields */ }Expand description
Individual async index
Implementations§
Source§impl AsyncIndex
impl AsyncIndex
Sourcepub async fn load_index(path: &Path) -> Result<Self>
pub async fn load_index(path: &Path) -> Result<Self>
Load an .index file asynchronously
Sourcepub async fn lookup(&self, ekey: &EKey) -> Option<ArchiveLocation>
pub async fn lookup(&self, ekey: &EKey) -> Option<ArchiveLocation>
Async lookup
Sourcepub async fn entry_count(&self) -> usize
pub async fn entry_count(&self) -> usize
Get entry count
Sourcepub async fn add_entry(&self, ekey: EKey, location: ArchiveLocation)
pub async fn add_entry(&self, ekey: EKey, location: ArchiveLocation)
Add an entry (for updates)
Sourcepub async fn remove_entry(&self, ekey: &EKey) -> Option<ArchiveLocation>
pub async fn remove_entry(&self, ekey: &EKey) -> Option<ArchiveLocation>
Remove an entry
Sourcepub async fn add_entries_batch(&self, entries: Vec<(EKey, ArchiveLocation)>)
pub async fn add_entries_batch(&self, entries: Vec<(EKey, ArchiveLocation)>)
Batch add entries
Auto Trait Implementations§
impl Freeze for AsyncIndex
impl !RefUnwindSafe for AsyncIndex
impl Send for AsyncIndex
impl Sync for AsyncIndex
impl Unpin for AsyncIndex
impl !UnwindSafe for AsyncIndex
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