pub struct ChecksumConfig {
pub algorithm: HashAlgorithm,
pub expected: String,
}Expand description
Checksum verification configuration.
Fields§
§algorithm: HashAlgorithmThe hash algorithm to use
expected: StringExpected checksum value (hex-encoded)
Implementations§
Source§impl ChecksumConfig
impl ChecksumConfig
Sourcepub fn new(algorithm: HashAlgorithm, expected: &str) -> Self
pub fn new(algorithm: HashAlgorithm, expected: &str) -> Self
Create a new checksum configuration.
Sourcepub fn from_string(checksum_str: &str) -> Result<Self>
pub fn from_string(checksum_str: &str) -> Result<Self>
Parse checksum from string with algorithm prefix (e.g., “sha256:abc123”).
Trait Implementations§
Source§impl Clone for ChecksumConfig
impl Clone for ChecksumConfig
Source§fn clone(&self) -> ChecksumConfig
fn clone(&self) -> ChecksumConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChecksumConfig
impl RefUnwindSafe for ChecksumConfig
impl Send for ChecksumConfig
impl Sync for ChecksumConfig
impl Unpin for ChecksumConfig
impl UnsafeUnpin for ChecksumConfig
impl UnwindSafe for ChecksumConfig
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