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 stats(&self) -> Result<TableStats, StorageError>;
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§
Sourcefn get<'a>(
&self,
key: impl Borrow<K::SelfType<'a>>,
) -> Result<MultimapValue<'_, V>, StorageError>where
K: 'a,
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.
fn range<'a, KR>( &self, range: impl RangeBounds<KR> + 'a, ) -> Result<MultimapRange<'_, K, V>, StorageError>
Sourcefn stats(&self) -> Result<TableStats, StorageError>
fn stats(&self) -> Result<TableStats, StorageError>
Retrieves information about storage usage for the table
fn len(&self) -> Result<u64, StorageError>
fn is_empty(&self) -> Result<bool, StorageError>
Provided Methods§
Sourcefn iter(&self) -> Result<MultimapRange<'_, K, V>, StorageError>
fn iter(&self) -> Result<MultimapRange<'_, K, V>, StorageError>
Returns an double-ended iterator over all elements in the table. Values are in ascending order.
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.