Trait HashableView

Source
pub trait HashableView: View + Send {
    type Hasher: Hasher;

    // Required methods
    fn hash(
        &self,
    ) -> impl Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send;
    fn hash_mut(
        &mut self,
    ) -> impl Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send;
}
Expand description

A view that supports hashing its values.

Required Associated Types§

Source

type Hasher: Hasher

How to compute hashes.

Required Methods§

Source

fn hash( &self, ) -> impl Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send

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).

Source

fn hash_mut( &mut self, ) -> impl Future<Output = Result<<Self::Hasher as Hasher>::Output, ViewError>> + Send

Same as hash but guaranteed to be wait-free.

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.

Implementors§

Source§

impl<C, I> HashableView for SetView<C, I>
where Self: View, ByteSetView<C>: HashableView,

Source§

impl<C, I, V> HashableView for CustomMapView<C, I, V>
where C: Context, I: Send + Sync + CustomSerialize, V: Clone + Send + Sync + Serialize + DeserializeOwned + 'static,

Source§

impl<C, I, V> HashableView for MapView<C, I, V>
where Self: View, ByteMapView<C, V>: HashableView,

Source§

impl<C, T> HashableView for LogView<C, T>

Source§

impl<C, T> HashableView for QueueView<C, T>

Source§

impl<C, T> HashableView for RegisterView<C, T>

Source§

impl<C, V> HashableView for ByteMapView<C, V>
where C: Context, V: Clone + Send + Sync + Serialize + DeserializeOwned + 'static,

Source§

impl<C: Context> HashableView for KeyValueStoreView<C>

Source§

impl<C: Context> HashableView for ByteSetView<C>

Source§

impl<C: Context, I> HashableView for CustomSetView<C, I>
where Self: View,

Source§

impl<C: Context, T: Serialize + DeserializeOwned + Send + Sync + Clone, const N: usize> HashableView for BucketQueueView<C, T, N>
where Self: View,

Source§

impl<I, W> HashableView for ReentrantCollectionView<W::Context, I, W>

Source§

impl<I, W> HashableView for ReentrantCustomCollectionView<W::Context, I, W>

Source§

impl<I, W: HashableView> HashableView for CollectionView<W::Context, I, W>

Source§

impl<I, W: HashableView> HashableView for CustomCollectionView<W::Context, I, W>
where Self: View,

Source§

impl<W, O> HashableView for WrappedHashableContainerView<W::Context, W, O>
where W: HashableView, O: Serialize + DeserializeOwned + Send + Sync + Copy + PartialEq, W::Hasher: Hasher<Output = O>,

Source§

impl<W: HashableView> HashableView for ByteCollectionView<W::Context, W>

Source§

impl<W: HashableView> HashableView for ReentrantByteCollectionView<W::Context, W>