[−][src]Struct meowhash::MeowHash
A hash produced by the MeowHasher
.
It consists of 8 128-bit SIMD register values, 128 bytes in total.
You can distill it into a u128
or use the entire 128 byte hash.
It's recommended to keep the MeowHash
instead of converting it
into an array of bytes, because MeowHash
es can be compared
efficiently using SIMD instructions where byte arrays may need a
byte by byte comparison.
Methods
impl MeowHash
[src]
pub fn from_bytes(bytes: [u8; 128]) -> Self
[src]
Create a MeowHash
from an array of 128 bytes.
pub fn from_slice(bytes: &[u8]) -> Option<Self>
[src]
Attempt to construct a MeowHash
from a slice of bytes.
This will fail if the slice doesn't contain exactly 128 bytes.
pub fn into_bytes(self) -> [u8; 128]
[src]
Convert a MeowHash
into an array of 128 bytes.
pub fn as_u128(&self) -> u128
[src]
Compress a MeowHash
into a u128
.
pub fn expand_seed(seed: &[u8]) -> Self
[src]
Construct a seed value from arbitrary length input data.
This can be an expensive operation, so try to only do it once.
pub fn default_seed() -> Self
[src]
Create a MeowHash
containing the default seed (an encoding of pi).
Trait Implementations
impl Clone for MeowHash
[src]
fn clone(&self) -> MeowHash
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MeowHash
[src]
impl Debug for MeowHash
[src]
impl Eq for MeowHash
[src]
impl From<[u8; 128]> for MeowHash
[src]
impl From<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>> for MeowHash
[src]
impl Into<[u8; 128]> for MeowHash
[src]
impl Into<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>> for MeowHash
[src]
impl Into<u128> for MeowHash
[src]
impl PartialEq<MeowHash> for MeowHash
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,