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).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.