[][src]Struct perfect_hash::PerfectHashMap64

pub struct PerfectHashMap64<C, H, T> { /* fields omitted */ }

Methods

impl<C, T> PerfectHashMap64<C, DefaultHasher, T>[src]

pub fn new() -> Self[src]

If you are not worried about DDoS you should use a faster hasher. Rust defaults to SipHash which is more DDoS resistant, but very slow. I recommend the fasthash crate for a collection of faster hashing algorithms. You should use with_hasher(hasher) or default() when you don't need DDoS resistance.

impl<C, H, T> PerfectHashMap64<C, H, T> where
    H: Hasher,
    C: Hash + Ord
[src]

pub fn with_hasher(hasher: H) -> Self[src]

pub fn with_capacity(capacity: u64) -> PerfectHashMap64<C, DefaultHasher, T>[src]

pub fn with_capacity_and_hasher(capacity: u64, hasher: H) -> Self[src]

pub fn unique_id<F>(&mut self, content: C, data: T, modify: F) -> Id<u64> where
    F: FnOnce(&mut T, &T), 
[src]

pub fn index_mut(&mut self, id: Id<u64>) -> (&C, &mut T)[src]

pub fn get_mut(&mut self, id: u64) -> Option<(&C, &mut T)>[src]

Trait Implementations

impl<C, H, T> Default for PerfectHashMap64<C, H, T> where
    H: Hasher + Default,
    C: Hash + Ord
[src]

impl<C, H, T> Index<Id<u64>> for PerfectHashMap64<C, H, T>[src]

type Output = (C, T)

The returned type after indexing.

Auto Trait Implementations

impl<C, H, T> Send for PerfectHashMap64<C, H, T> where
    C: Send,
    H: Send,
    T: Send

impl<C, H, T> Sync for PerfectHashMap64<C, H, T> where
    C: Sync,
    H: Sync,
    T: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.