[][src]Struct bee_crypto::ternary::Hash

pub struct Hash(_);

Ternary cryptographic hash.

Implementations

impl Hash[src]

pub fn zeros() -> Self[src]

Creates a hash filled with zeros.

pub fn as_trits(&self) -> &Trits<T1B1>[src]

Interpret the Hash as a trit slice.

pub fn as_trits_mut(&mut self) -> &mut Trits<T1B1>[src]

Interpret the Hash as a mutable trit slice.

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

Returns the weight - number of ending 0s - of the Hash.

Trait Implementations

impl Clone for Hash[src]

impl Copy for Hash[src]

impl Debug for Hash[src]

impl Deref for Hash[src]

type Target = Trits<T1B1>

The resulting type after dereferencing.

impl DerefMut for Hash[src]

impl Display for Hash[src]

impl Eq for Hash[src]

impl Hash for Hash[src]

impl PartialEq<Hash> for Hash[src]

impl<'a, T: RawEncoding<Trit = Btrit>> TryFrom<&'a Trits<T>> for Hash[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Hash

impl Send for Hash

impl Sync for Hash

impl Unpin for Hash

impl UnwindSafe for Hash

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.