Struct libipld::cid::multihash::Sha3Digest[][src]

pub struct Sha3Digest<S>(_)
where
    S: Size
;
Expand description

Multihash digest.

Trait Implementations

impl<S> AsMut<[u8]> for Sha3Digest<S> where
    S: Size
[src]

pub fn as_mut(&mut self) -> &mut [u8][src]

Performs the conversion.

impl<S> AsRef<[u8]> for Sha3Digest<S> where
    S: Size
[src]

pub fn as_ref(&self) -> &[u8][src]

Performs the conversion.

impl<S> Clone for Sha3Digest<S> where
    S: Clone + Size
[src]

pub fn clone(&self) -> Sha3Digest<S>[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<S> Debug for Sha3Digest<S> where
    S: Debug + Size
[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl<S> Default for Sha3Digest<S> where
    S: Default + Size
[src]

pub fn default() -> Sha3Digest<S>[src]

Returns the “default value” for a type. Read more

impl<S> Digest<S> for Sha3Digest<S> where
    S: Size
[src]

fn size(&self) -> u8[src]

Size of the digest.

fn wrap(digest: &[u8]) -> Result<Self, Error>[src]

Wraps the digest bytes.

fn from_reader<R>(r: R) -> Result<Self, Error> where
    R: Read
[src]

Reads a multihash digest from a byte stream that contains the digest prefixed with the size. Read more

impl<'_> From<&'_ Sha3Digest<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>> for Code[src]

pub fn from(
    digest: &Sha3Digest<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Code
[src]

Performs the conversion.

impl<'_> From<&'_ Sha3Digest<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for Code[src]

pub fn from(
    digest: &Sha3Digest<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>
) -> Code
[src]

Performs the conversion.

impl<'_> From<&'_ Sha3Digest<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>>> for Code[src]

pub fn from(
    digest: &Sha3Digest<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>>
) -> Code
[src]

Performs the conversion.

impl<'_> From<&'_ Sha3Digest<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>, B0>>> for Code[src]

pub fn from(
    digest: &Sha3Digest<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>, B0>>
) -> Code
[src]

Performs the conversion.

impl<S> From<GenericArray<u8, S>> for Sha3Digest<S> where
    S: Size
[src]

pub fn from(array: GenericArray<u8, S>) -> Sha3Digest<S>[src]

Performs the conversion.

impl<S> Hash for Sha3Digest<S> where
    S: Hash + Size
[src]

pub fn hash<__H>(&self, state: &mut __H) where
    __H: Hasher
[src]

Feeds this value into the given Hasher. Read more

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

impl<S> PartialEq<Sha3Digest<S>> for Sha3Digest<S> where
    S: PartialEq<S> + Size
[src]

pub fn eq(&self, other: &Sha3Digest<S>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

pub fn ne(&self, other: &Sha3Digest<S>) -> bool[src]

This method tests for !=.

impl<'_, S> TryFrom<&'_ [u8]> for Sha3Digest<S> where
    S: Size
[src]

Convert slice to Digest.

It errors when the length of the slice does not match the size of the Digest.

type Error = Error

The type returned in the event of a conversion error.

pub fn try_from(
    slice: &[u8]
) -> Result<Sha3Digest<S>, <Sha3Digest<S> as TryFrom<&'_ [u8]>>::Error>
[src]

Performs the conversion.

impl<S> Copy for Sha3Digest<S> where
    S: Size,
    <S as ArrayLength<u8>>::ArrayType: Copy
[src]

impl<S> Eq for Sha3Digest<S> where
    S: Eq + Size
[src]

impl<S> StructuralEq for Sha3Digest<S> where
    S: Size
[src]

impl<S> StructuralPartialEq for Sha3Digest<S> where
    S: Size
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for Sha3Digest<S> where
    <S as ArrayLength<u8>>::ArrayType: RefUnwindSafe

impl<S> Send for Sha3Digest<S>

impl<S> Sync for Sha3Digest<S>

impl<S> Unpin for Sha3Digest<S> where
    <S as ArrayLength<u8>>::ArrayType: Unpin

impl<S> UnwindSafe for Sha3Digest<S> where
    <S as ArrayLength<u8>>::ArrayType: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> References<RawCodec> for T[src]

pub fn references<R, E>(
    _c: RawCodec,
    _r: &mut R,
    _set: &mut E
) -> Result<(), Error> where
    E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
    R: Read
[src]

Scrape the references from an impl Read. Read more

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.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.