pub struct KeyValueCursor {
    subspace_length: usize,
    fdb_stream_keyvalue: FdbStreamKeyValue,
    limit_manager: LimitManager,
    values_limit: i32,
    continuation: KeyValueContinuationInternal,
    values_seen: i32,
    error: Option<CursorError>,
}
Expand description

The basic cursor for scanning ranges of the FDB database.

Fields§

§subspace_length: usize§fdb_stream_keyvalue: FdbStreamKeyValue§limit_manager: LimitManager§values_limit: i32§continuation: KeyValueContinuationInternal§values_seen: i32§error: Option<CursorError>

Implementations§

source§

impl KeyValueCursor

source

fn new( subspace_length: usize, fdb_stream_keyvalue: FdbStreamKeyValue, limit_manager: LimitManager, values_limit: i32, continuation: KeyValueContinuationInternal ) -> KeyValueCursor

Create a new KeyValueCursor.

source

pub async fn into_btreemap(self) -> (BTreeMap<Key, Value>, CursorError)

Drain the cursor and build a BTreeMap of Key and Value.

Trait Implementations§

source§

impl Cursor<KeyValue> for KeyValueCursor

source§

async fn next(&mut self) -> CursorResult<KeyValue>

Asynchronously return the next result from this cursor.
source§

fn collect(self) -> impl Future<Output = (Vec<T>, CursorError)> + Sendwhere Self: Sized + Send,

Drain the cursor pushing all emitted values into a collection.
source§

fn filter<F, Fut>( self, f: F ) -> impl Future<Output = CursorFilter<T, Self, F>> + Sendwhere Self: Sized + Send, F: FnMut(&T) -> Fut + Send, Fut: Future<Output = bool>,

Filters the values produced by this cursor according to the provided predicate. Read more
source§

fn map<U, F, Fut>( self, f: F ) -> impl Future<Output = CursorMap<T, Self, F>> + Sendwhere U: Send, Self: Sized + Send, F: FnMut(T) -> Fut + Send, Fut: Future<Output = U>,

Map this cursor’s items to a different type, returning a new cursor of the resulting type. Read more
source§

impl Debug for KeyValueCursor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Sealed for KeyValueCursor

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.