Struct redb::ReadOnlyMultimapTable
source · pub struct ReadOnlyMultimapTable<K: Key + 'static, V: Key + 'static> { /* private fields */ }
Expand description
A read-only multimap table
Implementations§
source§impl<K: Key + 'static, V: Key + 'static> ReadOnlyMultimapTable<K, V>
impl<K: Key + 'static, V: Key + 'static> ReadOnlyMultimapTable<K, V>
sourcepub fn get<'a>(
&self,
key: impl Borrow<K::SelfType<'a>>,
) -> Result<MultimapValue<'static, V>>
pub fn get<'a>( &self, key: impl Borrow<K::SelfType<'a>>, ) -> Result<MultimapValue<'static, V>>
This method is like ReadableMultimapTable::get()
, but the iterator is reference counted and keeps the transaction
alive until it is dropped.
sourcepub fn range<'a, KR>(
&self,
range: impl RangeBounds<KR>,
) -> Result<MultimapRange<'static, K, V>>
pub fn range<'a, KR>( &self, range: impl RangeBounds<KR>, ) -> Result<MultimapRange<'static, K, V>>
This method is like ReadableMultimapTable::range()
, but the iterator is reference counted and keeps the transaction
alive until it is dropped.
Trait Implementations§
source§impl<K: Key + 'static, V: Key + 'static> ReadableMultimapTable<K, V> for ReadOnlyMultimapTable<K, V>
impl<K: Key + 'static, V: Key + 'static> ReadableMultimapTable<K, V> for ReadOnlyMultimapTable<K, V>
source§fn get<'a>(
&self,
key: impl Borrow<K::SelfType<'a>>,
) -> Result<MultimapValue<'_, V>>
fn get<'a>( &self, key: impl Borrow<K::SelfType<'a>>, ) -> Result<MultimapValue<'_, V>>
Returns an iterator over all values for the given key. Values are in ascending order.
fn range<'a, KR>( &self, range: impl RangeBounds<KR> + 'a, ) -> Result<MultimapRange<'_, K, V>>
source§fn iter(&self) -> Result<MultimapRange<'_, K, V>>
fn iter(&self) -> Result<MultimapRange<'_, K, V>>
Returns an double-ended iterator over all elements in the table. Values are in ascending
order.
source§impl<K: Key + 'static, V: Key + 'static> ReadableTableMetadata for ReadOnlyMultimapTable<K, V>
impl<K: Key + 'static, V: Key + 'static> ReadableTableMetadata for ReadOnlyMultimapTable<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for ReadOnlyMultimapTable<K, V>
impl<K, V> !RefUnwindSafe for ReadOnlyMultimapTable<K, V>
impl<K, V> Send for ReadOnlyMultimapTable<K, V>
impl<K, V> Sync for ReadOnlyMultimapTable<K, V>
impl<K, V> Unpin for ReadOnlyMultimapTable<K, V>
impl<K, V> !UnwindSafe for ReadOnlyMultimapTable<K, V>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more