Trait linera_views::views::HashableView
source · pub trait HashableView<C>: View<C> {
type Hasher: Hasher;
// Required methods
fn hash_mut<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn hash<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A view that supports hashing its values.
Required Associated Types§
Required Methods§
sourcefn hash_mut<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn hash_mut<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Computes the hash of the values.
Implementations do not need to include a type tag. However, the usual precautions to enforce collision resistance must be applied (e.g. including the length of a collection of values).
sourcefn hash<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn hash<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Computes the hash of the values.
Implementations do not need to include a type tag. However, the usual precautions to enforce collision resistance must be applied (e.g. including the length of a collection of values).
Object Safety§
This trait is not object safe.