[][src]Struct parity_multihash::MultihashRef

pub struct MultihashRef<'a> { /* fields omitted */ }

Represents a valid multihash.

Methods

impl<'a> MultihashRef<'a>[src]

pub fn from_slice(input: &'a [u8]) -> Result<Self, DecodeError>[src]

Creates a MultihashRef from the given input.

pub fn algorithm(&self) -> Hash[src]

Returns which hashing algorithm is used in this multihash.

pub fn digest(&self) -> &'a [u8][src]

Returns the hashed data.

pub fn into_owned(self) -> Multihash[src]

Builds a Multihash that owns the data.

This operation allocates.

pub fn as_bytes(&self) -> &'a [u8][src]

Returns the bytes representation of this multihash.

Trait Implementations

impl<'a> Clone for MultihashRef<'a>[src]

impl<'a> Copy for MultihashRef<'a>[src]

impl<'a> Debug for MultihashRef<'a>[src]

impl<'a> Eq for MultihashRef<'a>[src]

impl<'a> Hash for MultihashRef<'a>[src]

impl<'a> PartialEq<Multihash> for MultihashRef<'a>[src]

impl<'a> PartialEq<MultihashRef<'a>> for Multihash[src]

impl<'a> PartialEq<MultihashRef<'a>> for MultihashRef<'a>[src]

impl<'a> StructuralEq for MultihashRef<'a>[src]

impl<'a> StructuralPartialEq for MultihashRef<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for MultihashRef<'a>

impl<'a> Send for MultihashRef<'a>

impl<'a> Sync for MultihashRef<'a>

impl<'a> Unpin for MultihashRef<'a>

impl<'a> UnwindSafe for MultihashRef<'a>

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> Same<T> for T

type Output = T

Should always be Self

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>,