pub struct AsyncMapSnapshot<'a, S: AsyncStore> { /* private fields */ }Expand description
Immutable version-pinned async read view.
Implementations§
Source§impl<'a, S> AsyncMapSnapshot<'a, S>
impl<'a, S> AsyncMapSnapshot<'a, S>
Sourcepub fn version(&self) -> &MapVersion
pub fn version(&self) -> &MapVersion
Pinned version metadata.
Sourcepub async fn get_many<K: AsRef<[u8]>>(
&self,
keys: &[K],
) -> Result<Vec<Option<Vec<u8>>>, Error>
pub async fn get_many<K: AsRef<[u8]>>( &self, keys: &[K], ) -> Result<Vec<Option<Vec<u8>>>, Error>
Read several keys while preserving order and duplicates.
Sourcepub async fn range<'s>(
&'s self,
start: &[u8],
end: Option<&[u8]>,
) -> Result<AsyncRangeIter<'s, S>, Error>
pub async fn range<'s>( &'s self, start: &[u8], end: Option<&[u8]>, ) -> Result<AsyncRangeIter<'s, S>, Error>
Lazily stream a key range.
Sourcepub async fn prefix<'s>(
&'s self,
prefix: &[u8],
) -> Result<AsyncRangeIter<'s, S>, Error>
pub async fn prefix<'s>( &'s self, prefix: &[u8], ) -> Result<AsyncRangeIter<'s, S>, Error>
Lazily stream one key prefix.
Sourcepub async fn range_page(
&self,
cursor: &RangeCursor,
end: Option<&[u8]>,
limit: usize,
) -> Result<RangePage, Error>
pub async fn range_page( &self, cursor: &RangeCursor, end: Option<&[u8]>, limit: usize, ) -> Result<RangePage, Error>
Read one forward cursor page.
Sourcepub async fn prefix_page(
&self,
prefix: &[u8],
cursor: &RangeCursor,
limit: usize,
) -> Result<RangePage, Error>
pub async fn prefix_page( &self, prefix: &[u8], cursor: &RangeCursor, limit: usize, ) -> Result<RangePage, Error>
Read one prefix cursor page.
Sourcepub async fn prove_key(&self, key: &[u8]) -> Result<KeyProof, Error>
pub async fn prove_key(&self, key: &[u8]) -> Result<KeyProof, Error>
Prove one key asynchronously.
Sourcepub async fn prove_keys<K: AsRef<[u8]>>(
&self,
keys: &[K],
) -> Result<MultiKeyProof, Error>
pub async fn prove_keys<K: AsRef<[u8]>>( &self, keys: &[K], ) -> Result<MultiKeyProof, Error>
Prove several keys asynchronously.
Sourcepub async fn prove_range(
&self,
start: &[u8],
end: Option<&[u8]>,
) -> Result<RangeProof, Error>
pub async fn prove_range( &self, start: &[u8], end: Option<&[u8]>, ) -> Result<RangeProof, Error>
Prove a complete range asynchronously.
Sourcepub async fn prove_prefix(&self, prefix: &[u8]) -> Result<RangeProof, Error>
pub async fn prove_prefix(&self, prefix: &[u8]) -> Result<RangeProof, Error>
Prove a complete prefix asynchronously.
Auto Trait Implementations§
impl<'a, S> Freeze for AsyncMapSnapshot<'a, S>
impl<'a, S> RefUnwindSafe for AsyncMapSnapshot<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for AsyncMapSnapshot<'a, S>where
S: Sync,
impl<'a, S> Sync for AsyncMapSnapshot<'a, S>where
S: Sync,
impl<'a, S> Unpin for AsyncMapSnapshot<'a, S>
impl<'a, S> UnsafeUnpin for AsyncMapSnapshot<'a, S>
impl<'a, S> UnwindSafe for AsyncMapSnapshot<'a, S>where
S: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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