Trait txn_core::future::AsyncPwmEquivalent

source ·
pub trait AsyncPwmEquivalent: AsyncPwm {
    // Required methods
    fn get_equivalent<Q>(
        &self,
        key: &Q
    ) -> impl Future<Output = Result<Option<&EntryValue<Self::Value>>, Self::Error>>
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
    fn get_entry_equivalent<Q>(
        &self,
        key: &Q
    ) -> impl Future<Output = Result<Option<(&Self::Key, &EntryValue<Self::Value>)>, Self::Error>>
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
    fn contains_key_equivalent<Q>(
        &self,
        key: &Q
    ) -> impl Future<Output = Result<bool, Self::Error>>
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
    fn remove_entry_equivalent<Q>(
        &mut self,
        key: &Q
    ) -> impl Future<Output = Result<Option<(Self::Key, EntryValue<Self::Value>)>, Self::Error>>
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
}
Expand description

An optimized version of the AsyncPwm trait that if your pending writes manager is depend on hash.

Required Methods§

source

fn get_equivalent<Q>( &self, key: &Q ) -> impl Future<Output = Result<Option<&EntryValue<Self::Value>>, Self::Error>>
where Self::Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

Optimized version of AsyncPwm::get that accepts borrowed keys.

source

fn get_entry_equivalent<Q>( &self, key: &Q ) -> impl Future<Output = Result<Option<(&Self::Key, &EntryValue<Self::Value>)>, Self::Error>>
where Self::Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

source

fn contains_key_equivalent<Q>( &self, key: &Q ) -> impl Future<Output = Result<bool, Self::Error>>
where Self::Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

Optimized version of AsyncPwm::contains_key that accepts borrowed keys.

source

fn remove_entry_equivalent<Q>( &mut self, key: &Q ) -> impl Future<Output = Result<Option<(Self::Key, EntryValue<Self::Value>)>, Self::Error>>
where Self::Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

Optimized version of AsyncPwm::remove_entry that accepts borrowed keys.

Object Safety§

This trait is not object safe.

Implementors§