[−][src]Struct xxhrs::XXH3_128
xxh3 64 bit c library bindings
Streaming mode is used just like the Hasher
trait, but does
not implement the trait because this returns u128, hasher requires u64
::default() and ::new() are equivalent; they construct the unseeded streaming variant…
Implementations
impl<'_> XXH3_128<'_>
[src]
pub fn hash(bytes: &[u8]) -> u128
[src]
One-shot hashing
pub unsafe fn hash_with_entropy_buffer(entropy: &[u8], bytes: &[u8]) -> u128
[src]
One-shot hashing with custom entropy buffer.
This corresponds to XXH3_64bits_withSecret. You probably want to use hash_with_entropy instead unless you really need to supply custom size entropy buffers, in which case this is the function to use.
Safety
This function is marked unsafe just to encourage using the EntropyPool abstraction which makes it hard to produce particularly unsafe entropy pools.
The entropy pool must be at least 136 bytes.
pub fn hash_with_entropy(entropy: &EntropyPool, bytes: &[u8]) -> u128
[src]
One-shot hashing with custom entropy buffer.
This corresponds to XXH3_64bits_withSecret.
pub fn hash_with_seed(seed: u64, bytes: &[u8]) -> u128
[src]
One-shot hashing with seed
pub fn new() -> XXH3_128<'static>
[src]
Streaming hashing
pub unsafe fn with_entropy_buffer(entropy: &[u8]) -> XXH3_128<'_>
[src]
Streaming hashing with custom entropy buffer.
This corresponds to XXH3_64bits_reset_withSecret.
This function is marked unsafe to discourage it's use; use with_entropy instead which copies the entropy (thus causing far fewer lifetime problems) and uses the safer EntropyPool abstraction.
Safety
Use this function if you really want to avoid the entropy copy or if you really need to use a custom size entropy pool.
The entropy pool must be at least 136 bytes.
pub fn with_entropy(entropy: &EntropyPool) -> XXH3_128<'static>
[src]
Streaming hashing with custom entropy buffer.
This corresponds to XXH3_64bits_reset_withSecret.
pub fn with_seed(seed: u64) -> XXH3_128<'static>
[src]
Streaming hashing with custom seed.
pub fn write(&mut self, bytes: &[u8])
[src]
pub fn finish(&self) -> u128
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for XXH3_128<'a>
impl<'a> !Send for XXH3_128<'a>
impl<'a> !Sync for XXH3_128<'a>
impl<'a> Unpin for XXH3_128<'a>
impl<'a> UnwindSafe for XXH3_128<'a>
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,