[][src]Struct perfect_hash::PerfectHashMap16

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

Methods

impl<C, T> PerfectHashMap16<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> PerfectHashMap16<C, H, T> where
    H: Hasher,
    C: Hash + Ord
[src]

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

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

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

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

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

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

Trait Implementations

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

impl<C, H, T> Index<Id<u16>> for PerfectHashMap16<C, H, T>[src]

type Output = (C, T)

The returned type after indexing.

Auto Trait Implementations

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

impl<C, H, T> Sync for PerfectHashMap16<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.