pub enum CheckSums {
Sha256(String),
Sha512(String),
None,
}Expand description
An enum to allow different checksum types
For now there is only sha256 and sha512
all other cases is a CheckSums::None
Variants§
Implementations§
Source§impl CheckSums
impl CheckSums
Sourcepub fn get_image_checksum_from_checksums_buffer(
name: &str,
checksums: &Option<String>,
filename: &str,
) -> CheckSums
pub fn get_image_checksum_from_checksums_buffer( name: &str, checksums: &Option<String>, filename: &str, ) -> CheckSums
retrieves the checksum of the image named name in the buffer
checksums that is the content of a file containing at least
one checksum. filename is the filename of that file containing
all checksums. We decide with its name the kind of checksums
it contains (sha256 or sha512) along with the content of the
line that may also be helpful
Trait Implementations§
impl StructuralPartialEq for CheckSums
Auto Trait Implementations§
impl Freeze for CheckSums
impl RefUnwindSafe for CheckSums
impl Send for CheckSums
impl Sync for CheckSums
impl Unpin for CheckSums
impl UnsafeUnpin for CheckSums
impl UnwindSafe for CheckSums
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