Struct ssdeep::FuzzyHashDualData
source · #[repr(align(8))]pub struct FuzzyHashDualData<const S1: usize, const S2: usize, const C1: usize, const C2: usize>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,{ /* private fields */ }
Expand description
An efficient compressed fuzzy hash representation, containing both normalized and raw block hash contents.
This struct contains a normalized fuzzy hash object and opaque data to perform “reverse normalization” afterwards.
On the current design, it allows compression ratio of about 5 / 8 (compared to two fuzzy hash objects, one normalized and another raw).
With this, you can compare many fuzzy hashes efficiently while preserving the original string representation without requiring too much memory.
Some methods accept AsRef
to the normalized FuzzyHashData
and on
such cases, it is possible to pass this object directly
(e.g. FuzzyHashCompareTarget::compare
).
Ordering
Sorting objects of this type will result in the following order.
- Two
FuzzyHashDualData
objects with different normalizedFuzzyHashData
objects (inside) will be ordered as the same order as the underlyingFuzzyHashData
. - Two
FuzzyHashDualData
objects with the same normalizedFuzzyHashData
objects (inside) will be ordered in an implementation-defined manner.
The implementation-defined order is not guaranteed to be stable. For instance, different versions of this crate may order them differently. However, it is guaranteed deterministic so that you can have the same order in the same program.
Safety
Generic parameters should not be considered stable because some generic
parameters are just there because of the current restrictions of Rust’s
constant generics (that will be resolved after the feature
generic_const_exprs
is stabilized).
Do not use FuzzyHashDualData
directly. Instead, use instantiations
of this generic type, DualFuzzyHash
and/or LongDualFuzzyHash
(for most cases, DualFuzzyHash
will be sufficient).
Examples (Basic; requires the alloc
feature)
use core::str::FromStr;
use ssdeep::{DualFuzzyHash, FuzzyHash, RawFuzzyHash};
let hash_str_raw = "12288:+ySwl5P+C5IxJ845HYV5sxOH/cccccccei:+Klhav84a5sxJ";
let hash_str_norm = "12288:+ySwl5P+C5IxJ845HYV5sxOH/cccei:+Klhav84a5sxJ";
let dual_hash = DualFuzzyHash::from_str(hash_str_raw).unwrap();
// This object can contain both
// normalized and raw fuzzy hash representations.
assert_eq!(dual_hash.to_raw_form().to_string(), hash_str_raw);
assert_eq!(dual_hash.to_normalized().to_string(), hash_str_norm);
Implementations§
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
sourcepub const MAX_BLOCK_HASH_SIZE_1: usize = FuzzyHashData<S1, S2, true>::MAX_BLOCK_HASH_SIZE_1
pub const MAX_BLOCK_HASH_SIZE_1: usize = FuzzyHashData<S1, S2, true>::MAX_BLOCK_HASH_SIZE_1
The maximum size of the block hash 1.
This value is the same as the underlying fuzzy hash type.
sourcepub const MAX_BLOCK_HASH_SIZE_2: usize = FuzzyHashData<S1, S2, true>::MAX_BLOCK_HASH_SIZE_2
pub const MAX_BLOCK_HASH_SIZE_2: usize = FuzzyHashData<S1, S2, true>::MAX_BLOCK_HASH_SIZE_2
The maximum size of the block hash 2.
This value is the same as the underlying fuzzy hash type.
sourcepub const IS_NORMALIZED_FORM: bool = false
pub const IS_NORMALIZED_FORM: bool = false
Denotes whether the fuzzy type only contains a normalized form.
In this type, it is always false
.
sourcepub const IS_LONG_FORM: bool = FuzzyHashData<S1, S2, true>::IS_LONG_FORM
pub const IS_LONG_FORM: bool = FuzzyHashData<S1, S2, true>::IS_LONG_FORM
Denotes whether the fuzzy type can contain a non-truncated fuzzy hash.
This value is the same as the underlying fuzzy hash type.
sourcepub const MAX_LEN_IN_STR: usize = FuzzyHashData<S1, S2, true>::MAX_LEN_IN_STR
pub const MAX_LEN_IN_STR: usize = FuzzyHashData<S1, S2, true>::MAX_LEN_IN_STR
The maximum length in the string representation.
This value is the same as the underlying fuzzy hash type.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new fuzzy hash object with empty contents.
This is equivalent to the fuzzy hash string 3::
.
sourcepub fn init_from_raw_form(&mut self, hash: &FuzzyHashData<S1, S2, false>)
pub fn init_from_raw_form(&mut self, hash: &FuzzyHashData<S1, S2, false>)
Initialize the object from a raw fuzzy hash.
sourcepub unsafe fn init_from_raw_form_internals_raw_unchecked(
&mut self,
log_block_size: u8,
block_hash_1: &[u8; S1],
block_hash_2: &[u8; S2],
block_hash_1_len: u8,
block_hash_2_len: u8
)
Available on crate feature unsafe
only.
pub unsafe fn init_from_raw_form_internals_raw_unchecked( &mut self, log_block_size: u8, block_hash_1: &[u8; S1], block_hash_2: &[u8; S2], block_hash_1_len: u8, block_hash_2_len: u8 )
unsafe
only.Initialize the fuzzy hash object with internal contents (raw). The input is of the raw form.
Safety
- Valid range of
block_hash_1
andblock_hash_2
must consist of valid Base64 indices. - Invalid range of
block_hash_1
andblock_hash_2
must be filled with zeroes. block_hash_1_len
andblock_hash_2_len
must be valid.log_block_size
must hold a valid base-2 logarithm form of a block size.
If they are not satisfied, the resulting object will be corrupted.
sourcepub fn init_from_raw_form_internals_raw(
&mut self,
log_block_size: u8,
block_hash_1: &[u8; S1],
block_hash_2: &[u8; S2],
block_hash_1_len: u8,
block_hash_2_len: u8
)
pub fn init_from_raw_form_internals_raw( &mut self, log_block_size: u8, block_hash_1: &[u8; S1], block_hash_2: &[u8; S2], block_hash_1_len: u8, block_hash_2_len: u8 )
Initialize the fuzzy hash object with internal contents (raw). The input is of the raw form.
Usage Constraints
- Valid range of
block_hash_1
andblock_hash_2
must consist of valid Base64 indices. - Invalid range of
block_hash_1
andblock_hash_2
must be filled with zeroes. block_hash_1_len
andblock_hash_2_len
must be valid.log_block_size
must hold a valid base-2 logarithm form of a block size.
sourcepub unsafe fn new_from_raw_form_internals_raw_unchecked(
log_block_size: u8,
block_hash_1: &[u8; S1],
block_hash_2: &[u8; S2],
block_hash_1_len: u8,
block_hash_2_len: u8
) -> Self
Available on crate feature unsafe
only.
pub unsafe fn new_from_raw_form_internals_raw_unchecked( log_block_size: u8, block_hash_1: &[u8; S1], block_hash_2: &[u8; S2], block_hash_1_len: u8, block_hash_2_len: u8 ) -> Self
unsafe
only.Creates a new fuzzy hash object with internal contents (raw). The input is of the raw form.
Safety
- Valid range of
block_hash_1
andblock_hash_2
must consist of valid Base64 indices. - Invalid range of
block_hash_1
andblock_hash_2
must be filled with zeroes. block_hash_1_len
andblock_hash_2_len
must be valid.log_block_size
must hold a valid base-2 logarithm form of a block size.
If they are not satisfied, the resulting object will be corrupted.
sourcepub fn new_from_raw_form_internals_raw(
log_block_size: u8,
block_hash_1: &[u8; S1],
block_hash_2: &[u8; S2],
block_hash_1_len: u8,
block_hash_2_len: u8
) -> Self
pub fn new_from_raw_form_internals_raw( log_block_size: u8, block_hash_1: &[u8; S1], block_hash_2: &[u8; S2], block_hash_1_len: u8, block_hash_2_len: u8 ) -> Self
Creates a new fuzzy hash object with internal contents (raw). The input is of the raw form.
Usage Constraints
- Valid range of
block_hash_1
andblock_hash_2
must consist of valid Base64 indices. - Invalid range of
block_hash_1
andblock_hash_2
must be filled with zeroes. block_hash_1_len
andblock_hash_2_len
must be valid.log_block_size
must hold a valid base-2 logarithm form of a block size.
sourcepub fn log_block_size(&self) -> u8
pub fn log_block_size(&self) -> u8
The base-2 logarithm form of the block size.
See also: “Block Size” section of FuzzyHashData
sourcepub fn block_size(&self) -> u32
pub fn block_size(&self) -> u32
The block size of the fuzzy hash.
sourcepub fn as_ref_normalized(&self) -> &FuzzyHashData<S1, S2, true>
pub fn as_ref_normalized(&self) -> &FuzzyHashData<S1, S2, true>
A reference to the normalized fuzzy hash.
To note, this operation should be fast enough because this type contains this object directly.
sourcepub fn from_raw_form(hash: &FuzzyHashData<S1, S2, false>) -> Self
pub fn from_raw_form(hash: &FuzzyHashData<S1, S2, false>) -> Self
Constructs an object from a raw fuzzy hash.
sourcepub fn from_normalized(hash: &FuzzyHashData<S1, S2, true>) -> Self
pub fn from_normalized(hash: &FuzzyHashData<S1, S2, true>) -> Self
Constructs an object from a normalized fuzzy hash.
sourcepub fn into_mut_raw_form(&self, hash: &mut FuzzyHashData<S1, S2, false>)
pub fn into_mut_raw_form(&self, hash: &mut FuzzyHashData<S1, S2, false>)
Decompresses a raw variant of the fuzzy hash and stores into an existing object.
sourcepub fn to_raw_form(&self) -> FuzzyHashData<S1, S2, false>
pub fn to_raw_form(&self) -> FuzzyHashData<S1, S2, false>
Decompresses and generates a raw variant of the fuzzy hash.
Based on the normalized fuzzy hash representation and the “reverse normalization” data, this method generates the original, a raw variant of the fuzzy hash.
sourcepub fn to_normalized(&self) -> FuzzyHashData<S1, S2, true>
pub fn to_normalized(&self) -> FuzzyHashData<S1, S2, true>
Returns the clone of the normalized fuzzy hash.
Where possible, as_ref_normalized
or
AsRef::as_ref
should be used instead.
sourcepub fn to_normalized_string(&self) -> String
Available on crate feature alloc
only.
pub fn to_normalized_string(&self) -> String
alloc
only.Converts the fuzzy hash to the string (normalized form).
This method returns the string corresponding the normalized form.
sourcepub fn to_raw_form_string(&self) -> String
Available on crate feature alloc
only.
pub fn to_raw_form_string(&self) -> String
alloc
only.Converts the fuzzy hash to the string (raw form).
This method returns the string corresponding the raw (non-normalized) form.
sourcepub fn from_bytes(str: &[u8]) -> Result<Self, ParseError>
pub fn from_bytes(str: &[u8]) -> Result<Self, ParseError>
Parse a fuzzy hash from given bytes (a slice of u8
).
sourcepub fn normalize_in_place(&mut self)
pub fn normalize_in_place(&mut self)
Normalize the fuzzy hash in place.
After calling this method, self
will be normalized.
In this implementation, it clears all “reverse normalization” data.
See also: “Normalization” section of FuzzyHashData
sourcepub fn is_normalized(&self) -> bool
pub fn is_normalized(&self) -> bool
Returns whether the dual fuzzy hash is normalized.
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Performs full validity checking of the internal structure.
The primary purpose of this is debugging and it should always
return true
unless…
- There is a bug in this crate, corrupting this structure or
- A memory corruption is occurred somewhere else.
Because of its purpose, this method is not designed to be fast.
Note that, despite that it is only relevant to users when the unsafe
feature is enabled but made public without any features because this
method is not unsafe.
Trait Implementations§
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> AsRef<FuzzyHashData<S1, S2, true>> for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> AsRef<FuzzyHashData<S1, S2, true>> for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§fn as_ref(&self) -> &FuzzyHashData<S1, S2, true>
fn as_ref(&self) -> &FuzzyHashData<S1, S2, true>
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Clone for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Clone for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§fn clone(&self) -> FuzzyHashDualData<S1, S2, C1, C2>
fn clone(&self) -> FuzzyHashDualData<S1, S2, C1, C2>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Debug for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Debug for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Default for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Default for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Display for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Display for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> From<FuzzyHashData<S1, S2, false>> for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> From<FuzzyHashData<S1, S2, false>> for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§fn from(value: FuzzyHashData<S1, S2, false>) -> Self
fn from(value: FuzzyHashData<S1, S2, false>) -> Self
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> From<FuzzyHashData<S1, S2, true>> for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> From<FuzzyHashData<S1, S2, true>> for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§fn from(value: FuzzyHashData<S1, S2, true>) -> Self
fn from(value: FuzzyHashData<S1, S2, true>) -> Self
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> FromStr for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> FromStr for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Hash for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Hash for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Ord for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> Ord for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> PartialEq<FuzzyHashDualData<S1, S2, C1, C2>> for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> PartialEq<FuzzyHashDualData<S1, S2, C1, C2>> for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
source§fn eq(&self, other: &FuzzyHashDualData<S1, S2, C1, C2>) -> bool
fn eq(&self, other: &FuzzyHashDualData<S1, S2, C1, C2>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> PartialOrd<FuzzyHashDualData<S1, S2, C1, C2>> for FuzzyHashDualData<S1, S2, C1, C2>where
BlockHashSize<S1>: ConstrainedBlockHashSize,
BlockHashSize<S2>: ConstrainedBlockHashSize,
BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes,
RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash,
RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
impl<const S1: usize, const S2: usize, const C1: usize, const C2: usize> PartialOrd<FuzzyHashDualData<S1, S2, C1, C2>> for FuzzyHashDualData<S1, S2, C1, C2>where BlockHashSize<S1>: ConstrainedBlockHashSize, BlockHashSize<S2>: ConstrainedBlockHashSize, BlockHashSizes<S1, S2>: ConstrainedBlockHashSizes, RleBlockSizeForBlockHash<S1, C1>: ConstrainedRleBlockSizeForBlockHash, RleBlockSizeForBlockHash<S2, C2>: ConstrainedRleBlockSizeForBlockHash,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more