pub struct PackageContents { /* private fields */ }Expand description
What an extracted package must hold, read from the archive whose digest was verified rather than from the tree it was unpacked into.
Kept in this process’s memory and nowhere else. The tree belongs to the account jobs run as, so a record on disk could be rewritten along with it, and the published digest covers the archive, not the tree. So a tree this process did not unpack has no contents to check against, and is downloaded again.
Implementations§
Source§impl PackageContents
impl PackageContents
Sourcepub fn verify(
&self,
root: &Path,
ignored: impl Fn(&OsStr) -> bool,
) -> Result<(), ContentsMismatch>
pub fn verify( &self, root: &Path, ignored: impl Fn(&OsStr) -> bool, ) -> Result<(), ContentsMismatch>
Whether root holds exactly this and nothing else, top-level entries
ignored answers yes for aside, reading every file. Off the async thread:
on the package’s ~9,000 files this takes up to seconds.
§Errors
The first difference found.
Trait Implementations§
Source§impl Debug for PackageContents
impl Debug for PackageContents
impl Eq for PackageContents
Source§impl PartialEq for PackageContents
impl PartialEq for PackageContents
impl StructuralPartialEq for PackageContents
Auto Trait Implementations§
impl Forget for PackageContents
impl Freeze for PackageContents
impl Move for PackageContents
impl RefUnwindSafe for PackageContents
impl Send for PackageContents
impl Sync for PackageContents
impl Unpin for PackageContents
impl UnsafeUnpin for PackageContents
impl UnwindSafe for PackageContents
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.