pub trait ReadableMultimapTable<K: RedbKey + 'static, V: RedbKey + 'static>: Sealed {
    // Required methods
    fn get<'a>(
        &self,
        key: impl Borrow<K::SelfType<'a>>
    ) -> Result<MultimapValue<'_, V>, StorageError>
       where K: 'a;
    fn range<'a, KR>(
        &self,
        range: impl RangeBounds<KR> + 'a
    ) -> Result<MultimapRange<'_, K, V>, StorageError>
       where K: 'a,
             KR: Borrow<K::SelfType<'a>> + 'a;
    fn len(&self) -> Result<u64, StorageError>;
    fn is_empty(&self) -> Result<bool, StorageError>;

    // Provided method
    fn iter(&self) -> Result<MultimapRange<'_, K, V>, StorageError> { ... }
}

Required Methods§

source

fn get<'a>( &self, key: impl Borrow<K::SelfType<'a>> ) -> Result<MultimapValue<'_, V>, StorageError>where K: 'a,

Returns an iterator over all values for the given key. Values are in ascending order.

source

fn range<'a, KR>( &self, range: impl RangeBounds<KR> + 'a ) -> Result<MultimapRange<'_, K, V>, StorageError>where K: 'a, KR: Borrow<K::SelfType<'a>> + 'a,

source

fn len(&self) -> Result<u64, StorageError>

source

fn is_empty(&self) -> Result<bool, StorageError>

Provided Methods§

source

fn iter(&self) -> Result<MultimapRange<'_, K, V>, StorageError>

Returns an double-ended iterator over all elements in the table. Values are in ascending order.

Implementors§

source§

impl<'db, 'txn, K: RedbKey + 'static, V: RedbKey + 'static> ReadableMultimapTable<K, V> for MultimapTable<'db, 'txn, K, V>

source§

impl<'txn, K: RedbKey + 'static, V: RedbKey + 'static> ReadableMultimapTable<K, V> for ReadOnlyMultimapTable<'txn, K, V>