Struct lfchring::Blake2bHasher[][src]

pub struct Blake2bHasher;

A Hasher implementation based on the BLAKE2b cryptographic hash function, as implemented in the blake2b_simd crate.

To use this Hasher implementation in lfchring-rs, the blake2b-hash crate feature must be enabled.

Examples

Assuming the blake2b-hash feature is enabled, a HashRing<N, H> that uses it can be initialized as shown below (for more initialization options, refer to the documentation of HashRing<N, H>):

use lfchring::{Blake2bHasher, HashRing, Result, Vnid};

const VIRTUAL_NODES_PER_NODE: Vnid = 2;
const REPLICATION_FACTOR: u8 = 3;

let ring: HashRing<str, Blake2bHasher> = HashRing::with_hasher(
    Blake2bHasher::default(),
    VIRTUAL_NODES_PER_NODE,
    REPLICATION_FACTOR
)?;

Trait Implementations

impl Debug for Blake2bHasher[src]

impl Default for Blake2bHasher[src]

impl Hasher for Blake2bHasher[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.