pub struct StoredHashes {
pub md5: Option<[u8; 16]>,
pub sha1: Option<[u8; 20]>,
pub hash_values: BTreeMap<String, String>,
}Expand description
Stored hash values parsed from an image.
Fields§
§md5: Option<[u8; 16]>Parsed MD5 hash bytes, if a valid MD5 value was stored.
sha1: Option<[u8; 20]>Parsed SHA1 hash bytes, if a valid SHA1 value was stored.
hash_values: BTreeMap<String, String>Stored hash strings keyed by hash identifier.
Implementations§
Source§impl StoredHashes
impl StoredHashes
Sourcepub fn hash_value(&self, identifier: &str) -> Option<&str>
pub fn hash_value(&self, identifier: &str) -> Option<&str>
Returns a stored hash value by identifier.
Sourcepub fn set_hash_value(
&mut self,
identifier: impl Into<String>,
value: impl Into<String>,
) -> Option<String>
pub fn set_hash_value( &mut self, identifier: impl Into<String>, value: impl Into<String>, ) -> Option<String>
Sets a stored hash value and returns the previous string value.
Sourcepub fn number_of_hash_values(&self) -> usize
pub fn number_of_hash_values(&self) -> usize
Returns the number of stored hash values.
Sourcepub fn hash_value_identifier(&self, index: usize) -> Option<&str>
pub fn hash_value_identifier(&self, index: usize) -> Option<&str>
Returns the hash identifier at a stable enumeration index.
Trait Implementations§
Source§impl Clone for StoredHashes
impl Clone for StoredHashes
Source§impl Debug for StoredHashes
impl Debug for StoredHashes
Source§impl Default for StoredHashes
impl Default for StoredHashes
impl Eq for StoredHashes
Source§impl PartialEq for StoredHashes
impl PartialEq for StoredHashes
impl StructuralPartialEq for StoredHashes
Auto Trait Implementations§
impl Freeze for StoredHashes
impl RefUnwindSafe for StoredHashes
impl Send for StoredHashes
impl Sync for StoredHashes
impl Unpin for StoredHashes
impl UnsafeUnpin for StoredHashes
impl UnwindSafe for StoredHashes
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more