pub struct TarballCache<THttpClient: NpmCacheHttpClient, TSys: FsCreateDirAll + FsHardLink + FsMetadata + FsOpen + FsRemoveFile + FsReadDir + FsRename + ThreadSleep + SystemRandom + Send + Sync + 'static> { /* 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: FsCreateDirAll + FsHardLink + FsMetadata + FsOpen + FsRemoveFile + FsReadDir + FsRename + ThreadSleep + SystemRandom + Send + Sync + 'static> TarballCache<THttpClient, TSys>
impl<THttpClient: NpmCacheHttpClient, TSys: FsCreateDirAll + FsHardLink + FsMetadata + FsOpen + FsRemoveFile + FsReadDir + FsRename + ThreadSleep + SystemRandom + Send + Sync + 'static> TarballCache<THttpClient, TSys>
pub fn new( cache: Arc<NpmCache<TSys>>, http_client: Arc<THttpClient>, sys: TSys, npmrc: Arc<ResolvedNpmRc>, ) -> 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 + FsCreateDirAll + FsHardLink + FsMetadata + FsOpen + FsRemoveFile + FsReadDir + FsRename + ThreadSleep + SystemRandom + Send + Sync + 'static> Debug for TarballCache<THttpClient, TSys>
impl<THttpClient: Debug + NpmCacheHttpClient, TSys: Debug + FsCreateDirAll + FsHardLink + FsMetadata + FsOpen + FsRemoveFile + FsReadDir + FsRename + ThreadSleep + SystemRandom + Send + Sync + 'static> 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