pub struct CacheConnection<Repo> {
pub repo: Repo,
}
Expand description
A connection to a cache repo.
Fields§
§repo: Repo
The underlying repository.
Implementations§
Source§impl<Repo> CacheConnection<Repo>where
Repo: CacheRepo,
impl<Repo> CacheConnection<Repo>where
Repo: CacheRepo,
Sourcepub async fn view(
&self,
uri: impl AsRef<str> + Send,
) -> Result<Cache<CacheRecord>, CacheRepoError>
pub async fn view( &self, uri: impl AsRef<str> + Send, ) -> Result<Cache<CacheRecord>, CacheRepoError>
View a cache record by URI
Sourcepub async fn insert<CacheCandidate>(
&self,
record: CacheCandidate,
) -> Result<CacheRecord, CacheRepoError>
pub async fn insert<CacheCandidate>( &self, record: CacheCandidate, ) -> Result<CacheRecord, CacheRepoError>
Insert a cache record
Trait Implementations§
Source§impl<Repo: Clone> Clone for CacheConnection<Repo>
impl<Repo: Clone> Clone for CacheConnection<Repo>
Source§fn clone(&self) -> CacheConnection<Repo>
fn clone(&self) -> CacheConnection<Repo>
Returns a duplicate 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<Repo: Default> Default for CacheConnection<Repo>
impl<Repo: Default> Default for CacheConnection<Repo>
Source§fn default() -> CacheConnection<Repo>
fn default() -> CacheConnection<Repo>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<Repo> Freeze for CacheConnection<Repo>where
Repo: Freeze,
impl<Repo> RefUnwindSafe for CacheConnection<Repo>where
Repo: RefUnwindSafe,
impl<Repo> Send for CacheConnection<Repo>where
Repo: Send,
impl<Repo> Sync for CacheConnection<Repo>where
Repo: Sync,
impl<Repo> Unpin for CacheConnection<Repo>where
Repo: Unpin,
impl<Repo> UnwindSafe for CacheConnection<Repo>where
Repo: UnwindSafe,
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