Trait txn_core::future::AsyncPwmComparable
source · pub trait AsyncPwmComparable: AsyncPwm {
// Required methods
fn get_comparable<Q>(
&self,
key: &Q
) -> impl Future<Output = Result<Option<&EntryValue<Self::Value>>, Self::Error>>
where Self::Key: Borrow<Q>,
Q: Ord + ?Sized;
fn get_entry_comparable<Q>(
&self,
key: &Q
) -> impl Future<Output = Result<Option<(&Self::Key, &EntryValue<Self::Value>)>, Self::Error>>
where Self::Key: Borrow<Q>,
Q: Ord + ?Sized;
fn contains_key_comparable<Q>(
&self,
key: &Q
) -> impl Future<Output = Result<bool, Self::Error>>
where Self::Key: Borrow<Q>,
Q: Ord + ?Sized;
fn remove_entry_comparable<Q>(
&mut self,
key: &Q
) -> impl Future<Output = Result<Option<(Self::Key, EntryValue<Self::Value>)>, Self::Error>>
where Self::Key: Borrow<Q>,
Q: Ord + ?Sized;
}
Expand description
An optimized version of the AsyncPwm
trait that if your pending writes manager is depend on the order.
Required Methods§
sourcefn get_comparable<Q>(
&self,
key: &Q
) -> impl Future<Output = Result<Option<&EntryValue<Self::Value>>, Self::Error>>
fn get_comparable<Q>( &self, key: &Q ) -> impl Future<Output = Result<Option<&EntryValue<Self::Value>>, Self::Error>>
Optimized version of AsyncPwm::get
that accepts borrowed keys.
fn get_entry_comparable<Q>( &self, key: &Q ) -> impl Future<Output = Result<Option<(&Self::Key, &EntryValue<Self::Value>)>, Self::Error>>
sourcefn contains_key_comparable<Q>(
&self,
key: &Q
) -> impl Future<Output = Result<bool, Self::Error>>
fn contains_key_comparable<Q>( &self, key: &Q ) -> impl Future<Output = Result<bool, Self::Error>>
Optimized version of AsyncPwm::contains_key
that accepts borrowed keys.
sourcefn remove_entry_comparable<Q>(
&mut self,
key: &Q
) -> impl Future<Output = Result<Option<(Self::Key, EntryValue<Self::Value>)>, Self::Error>>
fn remove_entry_comparable<Q>( &mut self, key: &Q ) -> impl Future<Output = Result<Option<(Self::Key, EntryValue<Self::Value>)>, Self::Error>>
Optimized version of AsyncPwm::remove_entry
that accepts borrowed keys.
Object Safety§
This trait is not object safe.