Enum backup_deduplicator::data::GeneralHash
source · pub enum GeneralHash {
SHA512([u8; 64]),
SHA256([u8; 32]),
SHA1([u8; 20]),
XXH64([u8; 8]),
XXH32([u8; 4]),
NULL,
}Variants§
Implementations§
source§impl GeneralHash
impl GeneralHash
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn new_sha512() -> Self
pub fn new_sha256() -> Self
pub fn new_sha1() -> Self
pub fn new_xxh64() -> Self
pub fn new_xxh32() -> Self
pub fn hash_type(&self) -> GeneralHashType
pub fn from_type(hash_type: GeneralHashType) -> Self
pub fn hasher(&self) -> Box<dyn GeneralHasher>
Trait Implementations§
source§impl Clone for GeneralHash
impl Clone for GeneralHash
source§fn clone(&self) -> GeneralHash
fn clone(&self) -> GeneralHash
Returns a copy 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 moresource§impl Debug for GeneralHash
impl Debug for GeneralHash
source§impl<'de> Deserialize<'de> for GeneralHash
impl<'de> Deserialize<'de> for GeneralHash
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for GeneralHash
impl Display for GeneralHash
source§impl Hash for GeneralHash
impl Hash for GeneralHash
source§impl PartialEq for GeneralHash
impl PartialEq for GeneralHash
source§fn eq(&self, other: &GeneralHash) -> bool
fn eq(&self, other: &GeneralHash) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for GeneralHash
impl PartialOrd for GeneralHash
source§fn partial_cmp(&self, other: &GeneralHash) -> Option<Ordering>
fn partial_cmp(&self, other: &GeneralHash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for GeneralHash
impl Serialize for GeneralHash
impl Eq for GeneralHash
impl StructuralPartialEq for GeneralHash
Auto Trait Implementations§
impl Freeze for GeneralHash
impl RefUnwindSafe for GeneralHash
impl Send for GeneralHash
impl Sync for GeneralHash
impl Unpin for GeneralHash
impl UnwindSafe for GeneralHash
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