pub struct SqliteCache { /* private fields */ }Implementations§
Source§impl SqliteCache
impl SqliteCache
Sourcepub fn open(path: &Path) -> Result<SqliteCache, StoreError>
pub fn open(path: &Path) -> Result<SqliteCache, StoreError>
Opens (creating if needed) the cache at path.
pub fn open_in_memory() -> Result<SqliteCache, StoreError>
pub fn stats(&self) -> Result<Stats, StoreError>
Sourcepub fn clear(&self) -> Result<(), StoreError>
pub fn clear(&self) -> Result<(), StoreError>
Empties the cache.
Trait Implementations§
Source§impl Cache for SqliteCache
impl Cache for SqliteCache
Source§fn get_lookups(
&self,
provider: &ProviderId,
ids: &[WorkId],
) -> Result<Vec<Option<Entry<Option<SourceRecord>>>>, StoreError>
fn get_lookups( &self, provider: &ProviderId, ids: &[WorkId], ) -> Result<Vec<Option<Entry<Option<SourceRecord>>>>, StoreError>
The cached answer for each of
ids at provider, in order; None
where nothing is cached.Source§fn put_lookups(
&self,
provider: &ProviderId,
answers: &[(&WorkId, Option<&SourceRecord>)],
at: Timestamp,
) -> Result<(), StoreError>
fn put_lookups( &self, provider: &ProviderId, answers: &[(&WorkId, Option<&SourceRecord>)], at: Timestamp, ) -> Result<(), StoreError>
Stores
provider’s answers in one transaction. A found record is
also reachable by every identifier it asserts.fn get_search( &self, provider: &ProviderId, query: &SearchQuery, ) -> Result<Option<Entry<Page>>, StoreError>
fn put_search( &self, provider: &ProviderId, query: &SearchQuery, page: &Page, at: Timestamp, ) -> Result<(), StoreError>
Auto Trait Implementations§
impl !Freeze for SqliteCache
impl Forget for SqliteCache
impl RefUnwindSafe for SqliteCache
impl Send for SqliteCache
impl Sync for SqliteCache
impl Unpin for SqliteCache
impl UnsafeUnpin for SqliteCache
impl UnwindSafe for SqliteCache
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