pub struct ArtifactStore { /* private fields */ }Expand description
Filesystem-backed canonical artifact store.
Implementations§
Source§impl ArtifactStore
impl ArtifactStore
Sourcepub fn path_for(
&self,
canonical_url: &IndexUrl,
context: ArtifactContext,
) -> PathBuf
pub fn path_for( &self, canonical_url: &IndexUrl, context: ArtifactContext, ) -> PathBuf
Deterministic path for a canonical URL/context key.
Sourcepub fn store(
&self,
artifact: &IndexArtifact,
) -> Result<PathBuf, ArtifactStoreError>
pub fn store( &self, artifact: &IndexArtifact, ) -> Result<PathBuf, ArtifactStoreError>
Stores an artifact under its canonical URL/context key.
Sourcepub fn load(
&self,
canonical_url: &IndexUrl,
context: ArtifactContext,
) -> Result<Option<IndexArtifact>, ArtifactStoreError>
pub fn load( &self, canonical_url: &IndexUrl, context: ArtifactContext, ) -> Result<Option<IndexArtifact>, ArtifactStoreError>
Loads an artifact for a canonical URL/context key.
Trait Implementations§
Source§impl Clone for ArtifactStore
impl Clone for ArtifactStore
Source§fn clone(&self) -> ArtifactStore
fn clone(&self) -> ArtifactStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArtifactStore
impl Debug for ArtifactStore
Source§impl PartialEq for ArtifactStore
impl PartialEq for ArtifactStore
Source§fn eq(&self, other: &ArtifactStore) -> bool
fn eq(&self, other: &ArtifactStore) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ArtifactStore
impl StructuralPartialEq for ArtifactStore
Auto Trait Implementations§
impl Freeze for ArtifactStore
impl RefUnwindSafe for ArtifactStore
impl Send for ArtifactStore
impl Sync for ArtifactStore
impl Unpin for ArtifactStore
impl UnsafeUnpin for ArtifactStore
impl UnwindSafe for ArtifactStore
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