pub struct CachedRegistry<R: Registry> { /* private fields */ }Implementations§
Source§impl<R: Registry> CachedRegistry<R>
impl<R: Registry> CachedRegistry<R>
pub fn new(inner: R, ttl: CacheTtlConfig) -> Self
Trait Implementations§
Source§impl<R: Registry + 'static> Registry for CachedRegistry<R>
impl<R: Registry + 'static> Registry for CachedRegistry<R>
Source§fn display_name(&self) -> &str
fn display_name(&self) -> &str
Human-readable registry name.
Source§fn supports_latest_version(&self) -> bool
fn supports_latest_version(&self) -> bool
Whether
get_latest_version yields a reliable result. Registries whose
versions can be ordered by semver return true. Docker Hub orders
free-form, non-semver tags by push date, so “latest” is not meaningful;
it returns false and callers should use list_versions instead.Source§fn get_package<'a>(
&'a self,
name: &'a str,
) -> Pin<Box<dyn Future<Output = RegistryResult<PackageInfo>> + Send + 'a>>
fn get_package<'a>( &'a self, name: &'a str, ) -> Pin<Box<dyn Future<Output = RegistryResult<PackageInfo>> + Send + 'a>>
Fetch package metadata (description, latest version, URLs).
Source§fn get_versions<'a>(
&'a self,
name: &'a str,
) -> Pin<Box<dyn Future<Output = RegistryResult<Vec<VersionInfo>>> + Send + 'a>>
fn get_versions<'a>( &'a self, name: &'a str, ) -> Pin<Box<dyn Future<Output = RegistryResult<Vec<VersionInfo>>> + Send + 'a>>
List all published versions, newest first.
Auto Trait Implementations§
impl<R> !RefUnwindSafe for CachedRegistry<R>
impl<R> !UnwindSafe for CachedRegistry<R>
impl<R> Freeze for CachedRegistry<R>where
R: Freeze,
impl<R> Send for CachedRegistry<R>
impl<R> Sync for CachedRegistry<R>
impl<R> Unpin for CachedRegistry<R>where
R: Unpin,
impl<R> UnsafeUnpin for CachedRegistry<R>where
R: UnsafeUnpin,
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