Skip to main content

AsyncSecondaryIndexSnapshot

Struct AsyncSecondaryIndexSnapshot 

Source
pub struct AsyncSecondaryIndexSnapshot<'a, S: AsyncIndexedStore> { /* private fields */ }
Expand description

One immutable secondary-index tree selected by an async snapshot.

Implementations§

Source§

impl<'a, S> AsyncSecondaryIndexSnapshot<'a, S>

Source

pub fn query( &self, budget: QueryBudget, ) -> Result<AsyncSecondaryIndexQuery<'_, 'a, S>, Error>

Create a finite-budget query session.

Source

pub fn name(&self) -> &[u8]

Source

pub fn descriptor(&self) -> &IndexDescriptor

Source

pub fn snapshot_ref(&self) -> &IndexSnapshotRef

Source

pub fn tree(&self) -> &Tree

Source

pub async fn exact( &self, term: &[u8], ) -> Result<Vec<SecondaryIndexMatch>, Error>

Source

pub async fn prefix( &self, prefix: &[u8], ) -> Result<Vec<SecondaryIndexMatch>, Error>

Source

pub async fn range( &self, start_term: &[u8], end_term: Option<&[u8]>, ) -> Result<Vec<SecondaryIndexMatch>, Error>

Source

pub async fn primary_keys(&self, term: &[u8]) -> Result<Vec<Vec<u8>>, Error>

Source

pub async fn projected( &self, term: &[u8], ) -> Result<Vec<ProjectedIndexEntry>, Error>

Source

pub async fn records( &self, term: &[u8], ) -> Result<Vec<IndexedSourceRecord>, Error>

Resolve matching primary keys with one native ordered async batch read.

Source

pub async fn scan_exact( &self, term: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>), ) -> Result<u64, Error>

Source

pub async fn scan_exact_until<B>( &self, term: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>

Source

pub async fn scan_prefix( &self, prefix: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>), ) -> Result<u64, Error>

Source

pub async fn scan_prefix_until<B>( &self, prefix: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>

Source

pub async fn scan_range( &self, start: &[u8], end: Option<&[u8]>, visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>), ) -> Result<u64, Error>

Source

pub async fn scan_range_until<B>( &self, start: &[u8], end: Option<&[u8]>, visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>

Source

pub async fn scan_exact_reverse( &self, term: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>), ) -> Result<u64, Error>

Source

pub async fn scan_exact_reverse_until<B>( &self, term: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>

Source

pub async fn scan_prefix_reverse( &self, prefix: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>), ) -> Result<u64, Error>

Source

pub async fn scan_prefix_reverse_until<B>( &self, prefix: &[u8], visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>

Source

pub async fn scan_range_reverse( &self, start: &[u8], end: Option<&[u8]>, visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>), ) -> Result<u64, Error>

Source

pub async fn scan_range_reverse_until<B>( &self, start: &[u8], end: Option<&[u8]>, visit: impl for<'row> FnMut(SecondaryIndexMatchRef<'row>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>

Source

pub async fn exact_page( &self, term: &[u8], cursor: Option<&SecondaryIndexCursor>, limit: usize, ) -> Result<SecondaryIndexPage, Error>

Source

pub async fn exact_reverse_page( &self, term: &[u8], cursor: Option<&SecondaryIndexCursor>, limit: usize, ) -> Result<SecondaryIndexPage, Error>

Source

pub async fn prefix_page( &self, prefix: &[u8], cursor: Option<&SecondaryIndexCursor>, limit: usize, ) -> Result<SecondaryIndexPage, Error>

Source

pub async fn prefix_reverse_page( &self, prefix: &[u8], cursor: Option<&SecondaryIndexCursor>, limit: usize, ) -> Result<SecondaryIndexPage, Error>

Source

pub async fn range_page( &self, start: &[u8], end: Option<&[u8]>, cursor: Option<&SecondaryIndexCursor>, limit: usize, ) -> Result<SecondaryIndexPage, Error>

Source

pub async fn range_reverse_page( &self, start: &[u8], end: Option<&[u8]>, cursor: Option<&SecondaryIndexCursor>, limit: usize, ) -> Result<SecondaryIndexPage, Error>

Source

pub fn exact_cursor_after( &self, query_term: &[u8], term: &[u8], primary_key: &[u8], direction: SecondaryIndexDirection, ) -> Result<SecondaryIndexCursor, Error>

Construct a snapshot-bound continuation cursor from the logical term and primary key carried by a DynamoDB-style ExclusiveStartKey.

Source

pub fn prefix_cursor_after( &self, query_prefix: &[u8], term: &[u8], primary_key: &[u8], direction: SecondaryIndexDirection, ) -> Result<SecondaryIndexCursor, Error>

Source

pub fn range_cursor_after( &self, start: &[u8], end: Option<&[u8]>, term: &[u8], primary_key: &[u8], direction: SecondaryIndexDirection, ) -> Result<SecondaryIndexCursor, Error>

Auto Trait Implementations§

§

impl<'a, S> Freeze for AsyncSecondaryIndexSnapshot<'a, S>
where &'a ProllyEngine<S>: Freeze,

§

impl<'a, S> RefUnwindSafe for AsyncSecondaryIndexSnapshot<'a, S>

§

impl<'a, S> Send for AsyncSecondaryIndexSnapshot<'a, S>
where &'a ProllyEngine<S>: Send,

§

impl<'a, S> Sync for AsyncSecondaryIndexSnapshot<'a, S>
where &'a ProllyEngine<S>: Sync,

§

impl<'a, S> Unpin for AsyncSecondaryIndexSnapshot<'a, S>
where &'a ProllyEngine<S>: Unpin,

§

impl<'a, S> UnsafeUnpin for AsyncSecondaryIndexSnapshot<'a, S>
where &'a ProllyEngine<S>: UnsafeUnpin,

§

impl<'a, S> UnwindSafe for AsyncSecondaryIndexSnapshot<'a, S>
where &'a ProllyEngine<S>: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.