pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
pub fn at(root: PathBuf) -> Store
pub fn default_location() -> Store
Sourcepub fn entry_path(
&self,
name: &str,
version: &str,
dist_ref: Option<&str>,
) -> PathBuf
pub fn entry_path( &self, name: &str, version: &str, dist_ref: Option<&str>, ) -> PathBuf
Entry key: version + first 12 hex chars of the dist reference, sanitised for the file system.
Sourcepub fn ensure(
&self,
name: &str,
version: &str,
dist_ref: Option<&str>,
zip_bytes: &[u8],
) -> Result<PathBuf>
pub fn ensure( &self, name: &str, version: &str, dist_ref: Option<&str>, zip_bytes: &[u8], ) -> Result<PathBuf>
Ensures the entry is present, extracting it if needed. Returns the path of the extracted tree.
pub fn contains( &self, name: &str, version: &str, dist_ref: Option<&str>, ) -> bool
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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