pub struct CachedCredentials<F> { /* private fields */ }Expand description
A bounded successful-credential cache in front of a caller’s fetcher.
Implementations§
Source§impl<F> CachedCredentials<F>
impl<F> CachedCredentials<F>
Sourcepub fn new(fetcher: F, capacity: usize) -> Self
pub fn new(fetcher: F, capacity: usize) -> Self
Cache up to capacity exact info URIs. Zero disables retention.
Sourcepub fn into_inner(self) -> F
pub fn into_inner(self) -> F
Recover the caller’s fetcher.
Trait Implementations§
Source§impl<F: CredentialFetcher> CredentialFetcher for CachedCredentials<F>
impl<F: CredentialFetcher> CredentialFetcher for CachedCredentials<F>
Source§fn fetch(
&mut self,
info: &str,
at: i64,
) -> Result<VerificationCredential, CredentialError>
fn fetch( &mut self, info: &str, at: i64, ) -> Result<VerificationCredential, CredentialError>
Acquire and validate the credential named by the exact
info URI at caller-supplied time. Read moreWhether this credential is trusted and authoritative for
origin.Auto Trait Implementations§
impl<F> Freeze for CachedCredentials<F>where
F: Freeze,
impl<F> RefUnwindSafe for CachedCredentials<F>where
F: RefUnwindSafe,
impl<F> Send for CachedCredentials<F>where
F: Send,
impl<F> Sync for CachedCredentials<F>where
F: Sync,
impl<F> Unpin for CachedCredentials<F>where
F: Unpin,
impl<F> UnsafeUnpin for CachedCredentials<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for CachedCredentials<F>where
F: 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more