linera_views::store

Trait KeyValueIterable

Source
pub trait KeyValueIterable<Error> {
    type Iterator<'a>: Iterator<Item = Result<(&'a [u8], &'a [u8]), Error>>
       where Self: 'a;
    type IteratorOwned: Iterator<Item = Result<(Vec<u8>, Vec<u8>), Error>>;

    // Required methods
    fn iterator(&self) -> Self::Iterator<'_>;
    fn into_iterator_owned(self) -> Self::IteratorOwned;
}
Expand description

How to iterate over the key-value pairs returned by a search query.

Required Associated Types§

Source

type Iterator<'a>: Iterator<Item = Result<(&'a [u8], &'a [u8]), Error>> where Self: 'a

The iterator that returns key-value pairs by reference.

Source

type IteratorOwned: Iterator<Item = Result<(Vec<u8>, Vec<u8>), Error>>

The iterator that returns key-value pairs by value.

Required Methods§

Source

fn iterator(&self) -> Self::Iterator<'_>

Iterates keys and values by reference.

Source

fn into_iterator_owned(self) -> Self::IteratorOwned

Iterates keys and values by value.

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.

Implementations on Foreign Types§

Source§

impl<E> KeyValueIterable<E> for Vec<(Vec<u8>, Vec<u8>)>

Source§

type Iterator<'a> = SimpleKeyValueIterator<'a, E>

Source§

type IteratorOwned = SimpleKeyValueIteratorOwned<E>

Source§

fn iterator(&self) -> Self::Iterator<'_>

Source§

fn into_iterator_owned(self) -> Self::IteratorOwned

Implementors§

Source§

impl KeyValueIterable<DynamoDbStoreInternalError> for DynamoDbKeyValues

Source§

type Iterator<'a> = DynamoDbKeyValueIterator<'a> where Self: 'a

Source§

type IteratorOwned = DynamoDbKeyValueIteratorOwned

Source§

impl<E1, E2, K1, K2> KeyValueIterable<DualStoreError<E1, E2>> for DualStoreKeyValues<K1, K2>
where K1: KeyValueIterable<E1>, K2: KeyValueIterable<E2>,