Struct holo_hash::HoloHashed[][src]

pub struct HoloHashed<C: HashableContent> { /* fields omitted */ }

Represents some piece of content along with its hash representation, so that hashes need not be calculated multiple times. Provides an easy constructor which consumes the content.

Implementations

impl<C> HoloHashed<C> where
    C: HashableContent
[src]

pub fn with_pre_hashed(content: C, hash: HoloHashOf<C>) -> Self[src]

Combine content with its precalculated hash

pub fn as_content(&self) -> &C[src]

Accessor for content

pub fn into_content(self) -> C[src]

Convert to content

pub fn into_inner(self) -> (C, HoloHashOf<C>)[src]

Deconstruct as a tuple

Trait Implementations

impl<C> AsRef<C> for HoloHashed<C> where
    C: HashableContent
[src]

impl<C> Borrow<C> for HoloHashed<C> where
    C: HashableContent
[src]

impl<C> Clone for HoloHashed<C> where
    C: HashableContent + Clone
[src]

impl<C> Debug for HoloHashed<C> where
    C: HashableContent + Debug
[src]

impl<C> Deref for HoloHashed<C> where
    C: HashableContent
[src]

type Target = C

The resulting type after dereferencing.

impl<'de, C: HashableContent> Deserialize<'de> for HoloHashed<C> where
    C: Deserialize<'de>, 
[src]

impl<C> Eq for HoloHashed<C> where
    C: HashableContent
[src]

impl<C: HashableContent> HasHash<<C as HashableContent>::HashType> for HoloHashed<C>[src]

impl<C> Hash for HoloHashed<C> where
    C: HashableContent
[src]

impl<C> PartialEq<HoloHashed<C>> for HoloHashed<C> where
    C: HashableContent
[src]

impl<C: HashableContent> Serialize for HoloHashed<C> where
    C: Serialize
[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for HoloHashed<C> where
    C: RefUnwindSafe,
    <C as HashableContent>::HashType: RefUnwindSafe

impl<C> Send for HoloHashed<C> where
    C: Send,
    <C as HashableContent>::HashType: Send

impl<C> Sync for HoloHashed<C> where
    C: Sync,
    <C as HashableContent>::HashType: Sync

impl<C> Unpin for HoloHashed<C> where
    C: Unpin,
    <C as HashableContent>::HashType: Unpin

impl<C> UnwindSafe for HoloHashed<C> where
    C: UnwindSafe,
    <C as HashableContent>::HashType: UnwindSafe

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,