pub struct SealSet {
pub entries: BTreeMap<PathBuf, Digest64>,
}Expand description
The digests of every sealed path, taken together.
Fields§
§entries: BTreeMap<PathBuf, Digest64>Path → digest, ordered so the set serialises identically every time.
Implementations§
Source§impl SealSet
impl SealSet
Sourcepub fn capture<I, P>(root: &Path, paths: I) -> Self
pub fn capture<I, P>(root: &Path, paths: I) -> Self
Digest every path, relative to root when the path is relative.
An unreadable path is recorded as absent rather than as an error: the question is only whether it is the same at the end as at the start, and “could not read it either time” is a consistent answer.
pub fn is_empty(&self) -> bool
Sourcepub fn breaches(&self, now: &SealSet) -> Vec<SealBreach>
pub fn breaches(&self, now: &SealSet) -> Vec<SealBreach>
Every path whose digest differs from self.
Compares over the union of both key sets, so a check whose declared seals somehow differ between capture and verify still reports rather than silently skipping the paths only one side knows about.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SealSet
impl<'de> Deserialize<'de> for SealSet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SealSet
impl StructuralPartialEq for SealSet
Auto Trait Implementations§
impl Freeze for SealSet
impl RefUnwindSafe for SealSet
impl Send for SealSet
impl Sync for SealSet
impl Unpin for SealSet
impl UnsafeUnpin for SealSet
impl UnwindSafe for SealSet
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