SimHashBits

Trait SimHashBits 

Source
pub trait SimHashBits:
    Sized
    + Clone
    + Copy
    + Zero
    + One
    + Debug
    + PartialOrd
    + PartialEq
    + Not<Output = Self>
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + BitXor<Output = Self>
    + BitOrAssign
    + Shl<usize, Output = Self>
    + Shr<usize, Output = Self>
    + ShrAssign<usize>
    + Hash
    + Eq {
    // Required methods
    fn count_ones(self) -> usize;
    fn to_u32_high_bits(self) -> u32;
    fn to_u64_high_bits(self) -> u64;
    fn hamming_distance(&self, rhs: &Self) -> usize;
    fn bit_length() -> usize;

    // Provided method
    fn hamming_angle(&self, rhs: &Self) -> f64 { ... }
}

Required Methods§

Provided Methods§

Source

fn hamming_angle(&self, rhs: &Self) -> f64

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SimHashBits for u64

Source§

impl SimHashBits for u128

Implementors§

Source§

impl<const L: usize> SimHashBits for BitArray<L>