Skip to main content

ZeroMapIterView

Struct ZeroMapIterView 

Source
pub struct ZeroMapIterView<'a, K, const V: usize, T, H = NoHook, D = Bitcask>
where K: Key + Send + Sync + Hash + Eq, T: Copy + IntoBytes + FromBytes + Immutable, H: TypedWriteHook<K, T>, D: Durability,
{ /* private fields */ }
Expand description

View over an iterable ZeroMap; exposes ordered iteration over (K, T) entries and cheap keys-only iteration. Obtained via ZeroMap::iter_view.

Implementations§

Source§

impl<K, const V: usize, T, H, D> ZeroMapIterView<'_, K, V, T, H, D>
where K: Key + Send + Sync + Hash + Eq, T: Copy + IntoBytes + FromBytes + Immutable, H: TypedWriteHook<K, T>, D: Durability,

Source

pub fn iter(&self) -> impl Iterator<Item = (K, T)> + '_

Full ordered scan in the collection’s configured direction.

Source

pub fn range(&self, start: &K, end: &K) -> impl Iterator<Item = (K, T)> + '_

Iterate entries in [start, end) — start inclusive, end exclusive.

Source

pub fn range_bounds( &self, start: Bound<&K>, end: Bound<&K>, ) -> impl Iterator<Item = (K, T)> + '_

Iterate entries in range defined by start and end bounds.

Source

pub fn prefix_iter(&self, prefix: &[u8]) -> impl Iterator<Item = (K, T)> + '_

Iterate entries whose keys start with prefix.

Source

pub fn paginate(&self, after: Option<&K>, limit: usize) -> Page<K, T>

Keyset pagination in the collection’s configured direction.

Source

pub fn keys(&self) -> impl Iterator<Item = K> + '_

Full ordered keys-only scan — no value materialized.

Source

pub fn keys_range(&self, start: &K, end: &K) -> impl Iterator<Item = K> + '_

Keys-only iteration over [start, end).

Source

pub fn keys_range_bounds( &self, start: Bound<&K>, end: Bound<&K>, ) -> impl Iterator<Item = K> + '_

Keys-only iteration over a bounded range.

Source

pub fn keys_prefix(&self, prefix: &[u8]) -> impl Iterator<Item = K> + '_

Keys-only iteration over keys starting with prefix.

Source

pub fn keys_paginate(&self, after: Option<&K>, limit: usize) -> KeyPage<K>

Keys-only pagination — cheap, materializes no values.

Source

pub fn retain(&self, f: impl FnMut(&K, &T) -> bool) -> DbResult<()>

Keep entries where f returns true; delete the rest via ZeroMap::compare_delete using the value observed during iteration.

Not atomic across the collection; a genuine storage error aborts the scan and is returned. Concurrent value/key changes (CasMismatch/KeyNotFound) are skipped.

Auto Trait Implementations§

§

impl<'a, K, const V: usize, T, H = NoHook, D = Bitcask> !RefUnwindSafe for ZeroMapIterView<'a, K, V, T, H, D>

§

impl<'a, K, const V: usize, T, H = NoHook, D = Bitcask> !UnwindSafe for ZeroMapIterView<'a, K, V, T, H, D>

§

impl<'a, K, const V: usize, T, H, D> Freeze for ZeroMapIterView<'a, K, V, T, H, D>
where MapIterView<'a, ZeroMap<K, V, T, H, D>>: Freeze,

§

impl<'a, K, const V: usize, T, H, D> Send for ZeroMapIterView<'a, K, V, T, H, D>
where MapIterView<'a, ZeroMap<K, V, T, H, D>>: Send,

§

impl<'a, K, const V: usize, T, H, D> Sync for ZeroMapIterView<'a, K, V, T, H, D>
where MapIterView<'a, ZeroMap<K, V, T, H, D>>: Sync,

§

impl<'a, K, const V: usize, T, H, D> Unpin for ZeroMapIterView<'a, K, V, T, H, D>
where MapIterView<'a, ZeroMap<K, V, T, H, D>>: Unpin,

§

impl<'a, K, const V: usize, T, H, D> UnsafeUnpin for ZeroMapIterView<'a, K, V, T, H, D>
where MapIterView<'a, ZeroMap<K, V, T, H, D>>: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more