Trait async_hash::Hash[][src]

pub trait Hash: Send + Sync + Sized {
    type Context: Send + Sync;
    type Error: Error + Send + Sync;
    fn hash<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cxt: &'life1 Self::Context
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn hash_owned<'life0, 'async_trait>(
        self,
        cxt: &'life0 Self::Context
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn hash_hex<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cxt: &'life1 Self::Context
    ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... } }
Expand description

Defines a standard hash for a scalar value.

Associated Types

Contextual information needed to access the data which this state contains.

Use () if there is no contextual data needed.

The type of error which may be returned when accessing this state’s data.

Use Infallible if there is no error to return.

Required methods

Compute the SHA256 hash of this state.

Provided methods

Consume this state and compute its SHA256 hash.

Return the SHA256 hash of this state as a hexadecimal string.

Implementations on Foreign Types

Implementors