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§fn clone(&self) -> StoredHashes
fn clone(&self) -> StoredHashes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StoredHashes
impl Debug for StoredHashes
Source§impl Default for StoredHashes
impl Default for StoredHashes
Source§fn default() -> StoredHashes
fn default() -> StoredHashes
Returns the “default value” for a type. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.