[][src]Struct hashed::HashedGeneric

#[repr(transparent)]
pub struct HashedGeneric<T: ?Sized, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
{ /* fields omitted */ }

Methods

impl<T: ?Sized, V> HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

pub fn new(hashee: &T) -> Self[src]

Create a new Hashed from &T. Note that this function doesn't consume the input, so if it is later modified the hash will not update. To stop these kinds of errors, it is recommended to use the From or Into traits instead of this function whenever possible.

pub fn value(&self) -> V[src]

Get the actual hash value the Hashed is wrapping.

Trait Implementations

impl<T: Copy + ?Sized, V: Copy> Copy for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

impl<T: ?Sized, V> Into<u64> for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

impl<T, V> Default for HashedGeneric<T, V> where
    T: Hash + Default,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

impl<T: Clone + ?Sized, V: Clone> Clone for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq + ?Sized, V: PartialEq> PartialEq<HashedGeneric<T, V>> for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

impl<T, V> From<T> for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

impl<T: Eq + ?Sized, V: Eq> Eq for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

impl<T: ?Sized, V> Debug for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + LowerHex + Copy,
    u64: AsPrimitive<V>, 
[src]

impl<T: Hash + ?Sized, V: Hash> Hash for HashedGeneric<T, V> where
    T: Hash,
    V: AsPrimitive<u64> + Copy,
    u64: AsPrimitive<V>, 
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<T: ?Sized, V> Sync for HashedGeneric<T, V> where
    T: Sync,
    V: Sync

impl<T: ?Sized, V> Unpin for HashedGeneric<T, V> where
    T: Unpin,
    V: Unpin

impl<T: ?Sized, V> Send for HashedGeneric<T, V> where
    T: Send,
    V: Send

impl<T: ?Sized, V> UnwindSafe for HashedGeneric<T, V> where
    T: UnwindSafe,
    V: UnwindSafe

impl<T: ?Sized, V> RefUnwindSafe for HashedGeneric<T, V> where
    T: RefUnwindSafe,
    V: RefUnwindSafe

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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.

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

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

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