#[non_exhaustive]pub struct ChecksumPolicy {
pub allow_weak: bool,
}Expand description
Caller choices for how declared checksums are judged.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.allow_weak: boolAccept a match when every declared algorithm is weak (SHA-1 only).
Off by default: such a match yields IntegrityOutcome::Weak.
Implementations§
Source§impl ChecksumPolicy
impl ChecksumPolicy
Sourcepub fn new() -> Self
pub fn new() -> Self
Default policy: weak-only matches are not IntegrityOutcome::Verified.
Sourcepub fn with_allow_weak(self, allow: bool) -> Self
pub fn with_allow_weak(self, allow: bool) -> Self
Accept or reject weak-only matches.
Trait Implementations§
Source§impl Clone for ChecksumPolicy
impl Clone for ChecksumPolicy
impl Copy for ChecksumPolicy
Source§impl Debug for ChecksumPolicy
impl Debug for ChecksumPolicy
Source§impl Default for ChecksumPolicy
impl Default for ChecksumPolicy
impl Eq for ChecksumPolicy
Source§impl PartialEq for ChecksumPolicy
impl PartialEq for ChecksumPolicy
impl StructuralPartialEq for ChecksumPolicy
Auto Trait Implementations§
impl Forget for ChecksumPolicy
impl Freeze for ChecksumPolicy
impl Move for ChecksumPolicy
impl RefUnwindSafe for ChecksumPolicy
impl Send for ChecksumPolicy
impl Sync for ChecksumPolicy
impl Unpin for ChecksumPolicy
impl UnsafeUnpin for ChecksumPolicy
impl UnwindSafe for ChecksumPolicy
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