pub trait Iterator {
// Required methods
fn next<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn error<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<&[u8]>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn value<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<&[u8]>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn release<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Required Methods§
sourcefn next<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Attempts to move the iterator to the next key/value pair. It returns whether the iterator successfully moved to a new key/value pair. The iterator may return false if the underlying database has been closed before the iteration has completed, in which case future calls to Error() must return ErrorKind::Other, “database closed”)
sourcefn error<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn error<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns any accumulated error. Exhausting all the key/value pairs is not considered to be an error. Error should be called after all key/value pairs have been exhausted ie. after Next() has returned false.
sourcefn key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<&[u8]>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn key<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<&[u8]>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the key of the current key/value pair, or empty slice if done.