pub struct ArtifactCache { /* private fields */ }Implementations§
Source§impl ArtifactCache
impl ArtifactCache
pub fn new(root: impl Into<PathBuf>, trust: TrustPolicy) -> Self
Sourcepub fn offline(self, offline: bool) -> Self
pub fn offline(self, offline: bool) -> Self
Disable network downloads: Self::install fails a missing artifact with
ComponentError::Offline instead of attempting a request. An artifact already
verified on disk (or served via a file:// URL) is unaffected.
pub fn root(&self) -> &Path
pub fn object_path( &self, entry: &ComponentLockEntry, ) -> Result<PathBuf, ComponentError>
pub fn install( &self, entry: &ComponentLockEntry, ) -> Result<CachedArtifact, ComponentError>
pub fn install_from_reader( &self, entry: &ComponentLockEntry, reader: impl Read, ) -> Result<CachedArtifact, ComponentError>
Trait Implementations§
Source§impl Clone for ArtifactCache
impl Clone for ArtifactCache
Auto Trait Implementations§
impl Freeze for ArtifactCache
impl RefUnwindSafe for ArtifactCache
impl Send for ArtifactCache
impl Sync for ArtifactCache
impl Unpin for ArtifactCache
impl UnsafeUnpin for ArtifactCache
impl UnwindSafe for ArtifactCache
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