pub struct TarballCache<THttpClient: NpmCacheHttpClient, TSys: NpmCacheSys> { /* private fields */ }Expand description
Coordinates caching of tarballs being loaded from the npm registry.
This is shared amongst all the workers.
Implementations§
Source§impl<THttpClient: NpmCacheHttpClient, TSys: NpmCacheSys> TarballCache<THttpClient, TSys>
impl<THttpClient: NpmCacheHttpClient, TSys: NpmCacheSys> TarballCache<THttpClient, TSys>
pub fn new( cache: Arc<NpmCache<TSys>>, http_client: Arc<THttpClient>, sys: TSys, npmrc: Arc<ResolvedNpmRc>, reporter: Option<Arc<dyn TarballCacheReporter>>, ) -> Self
pub async fn ensure_package( self: &Arc<Self>, package_nv: &PackageNv, dist: &NpmPackageVersionDistInfo, ) -> Result<(), EnsurePackageError>
Trait Implementations§
Source§impl<THttpClient: Debug + NpmCacheHttpClient, TSys: Debug + NpmCacheSys> Debug for TarballCache<THttpClient, TSys>
impl<THttpClient: Debug + NpmCacheHttpClient, TSys: Debug + NpmCacheSys> Debug for TarballCache<THttpClient, TSys>
Auto Trait Implementations§
impl<THttpClient, TSys> !Freeze for TarballCache<THttpClient, TSys>
impl<THttpClient, TSys> !RefUnwindSafe for TarballCache<THttpClient, TSys>
impl<THttpClient, TSys> Send for TarballCache<THttpClient, TSys>
impl<THttpClient, TSys> Sync for TarballCache<THttpClient, TSys>
impl<THttpClient, TSys> Unpin for TarballCache<THttpClient, TSys>where
TSys: Unpin,
impl<THttpClient, TSys> !UnwindSafe for TarballCache<THttpClient, TSys>
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