pub struct CachePackages { /* private fields */ }
Implementations§
Source§impl CachePackages
impl CachePackages
Sourcepub fn from_entries(entries: Vec<PinnedAbsolutePackageUrl>) -> Self
pub fn from_entries(entries: Vec<PinnedAbsolutePackageUrl>) -> Self
Create a new instance of CachePackages
containing entries provided.
Sourcepub fn contents(
&self,
) -> impl ExactSizeIterator<Item = &PinnedAbsolutePackageUrl>
pub fn contents( &self, ) -> impl ExactSizeIterator<Item = &PinnedAbsolutePackageUrl>
Iterator over the contents of the mapping.
Sourcepub fn into_contents(
self,
) -> impl ExactSizeIterator<Item = PinnedAbsolutePackageUrl>
pub fn into_contents( self, ) -> impl ExactSizeIterator<Item = PinnedAbsolutePackageUrl>
Iterator over the contents of the mapping, consuming self.
Sourcepub fn hash_for_package(&self, pkg: &AbsolutePackageUrl) -> Option<Hash>
pub fn hash_for_package(&self, pkg: &AbsolutePackageUrl) -> Option<Hash>
Get the hash for a package.
pub fn serialize(&self, writer: impl Write) -> Result<(), Error>
pub fn find_unpinned_url( &self, url: &UnpinnedAbsolutePackageUrl, ) -> Option<&PinnedAbsolutePackageUrl>
Trait Implementations§
Source§impl Debug for CachePackages
impl Debug for CachePackages
Source§impl PartialEq for CachePackages
impl PartialEq for CachePackages
impl Eq for CachePackages
impl StructuralPartialEq for CachePackages
Auto Trait Implementations§
impl Freeze for CachePackages
impl RefUnwindSafe for CachePackages
impl Send for CachePackages
impl Sync for CachePackages
impl Unpin for CachePackages
impl UnwindSafe for CachePackages
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