Skip to main content

StrictRows

Trait StrictRows 

Source
pub trait StrictRows:
    Sealed
    + BulkScan
    + OwnedRows {
    type TryRows: Iterator<Item = DbResult<(Self::Key, Self::Val)>>;

    // Required methods
    fn try_rows(
        self,
        start: Bound<Self::Key>,
        end: Bound<Self::Key>,
        dir: Dir,
    ) -> Self::TryRows;
    fn delete_if_unchanged(
        &self,
        key: &Self::Key,
        expected: &Self::Val,
    ) -> DbResult<bool>;
}
Expand description

Sealed strict row seam used by bulk retention operations.

Required Associated Types§

Source

type TryRows: Iterator<Item = DbResult<(Self::Key, Self::Val)>>

Strict, owned key/value iterator for a bounded retention pass.

A storage or value-decoding failure is yielded as Err and terminates the iterator instead of being skipped.

Required Methods§

Source

fn try_rows( self, start: Bound<Self::Key>, end: Bound<Self::Key>, dir: Dir, ) -> Self::TryRows

Walk strict owned rows in the supplied bounds and direction.

Source

fn delete_if_unchanged( &self, key: &Self::Key, expected: &Self::Val, ) -> DbResult<bool>

Delete key only when it still stores expected.

Returns Ok(false) when a concurrent writer changed or removed the row; other failures are returned unchanged.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, K: Key + Send + Sync + Hash + Eq, H: WriteHook<K>> StrictRows for MapScan<&'a VarMap<K, H>>

Source§

type TryRows = VarMapTryIter<'a, K, H>

Source§

impl<'a, K: Key + Send + Sync + Hash + Eq, T: Clone + PartialEq + Send + Sync, C: Codec<T> + Sync, H: TypedWriteHook<K, T>> StrictRows for MapScan<&'a TypedMap<K, T, C, H>>

Source§

type TryRows = InfallibleRows<K, T, OwnedRowsIter<MapScan<&'a TypedMap<K, T, C, H>>, MapRowIter<'a, K, T, C, H>>>

Source§

impl<'a, K: Key + Send + Sync + Hash + Eq, T: Send + Sync, C: Codec<T> + Clone + Sync, H: TypedWriteHook<K, T>> StrictRows for MapScan<&'a VarTypedMap<K, T, C, H>>

Source§

type TryRows = VarTypedMapTryIter<'a, K, T, C, H>

Source§

impl<'a, K: Key + Send + Sync + Hash + Eq, const V: usize, H: WriteHook<K>, D: Durability> StrictRows for MapScan<&'a ConstMap<K, V, H, D>>

Source§

type TryRows = InfallibleRows<K, [u8; V], ConstMapRowIter<'a, K, V, H, D>>

Source§

impl<'a, K: Key + Send + Sync + Hash + Eq, const V: usize, T: Copy + IntoBytes + FromBytes + Immutable, H: TypedWriteHook<K, T>, D: Durability> StrictRows for MapScan<&'a ZeroMap<K, V, T, H, D>>

Source§

type TryRows = InfallibleRows<K, T, ZeroMapRowIter<'a, K, V, T, H, D>>

Source§

impl<'a, K: Key, H: WriteHook<K>> StrictRows for TreeScan<&'a VarTree<K, H>>

Source§

type TryRows = DirRangeIter<TryVarIter<'a, K, H>>

Source§

impl<'a, K: Key, T: Clone + PartialEq + Send + Sync, C: Codec<T> + Sync, H: TypedWriteHook<K, T>> StrictRows for TreeScan<&'a TypedTree<K, T, C, H>>

Source§

type TryRows = InfallibleRows<K, T, OwnedRowsIter<TreeScan<&'a TypedTree<K, T, C, H>>, TreeRowIter<'a, K, T>>>

Source§

impl<'a, K: Key, T: Send + Sync, C: Codec<T> + Clone, H: TypedWriteHook<K, T>> StrictRows for TreeScan<&'a VarTypedTree<K, T, C, H>>

Source§

type TryRows = TryVarTypedIter<'a, K, T, C, H>

Source§

impl<'a, K: Key, const V: usize, H: WriteHook<K>, D: Durability> StrictRows for TreeScan<&'a ConstTree<K, V, H, D>>

Source§

type TryRows = InfallibleRows<K, [u8; V], ConstTreeRowIter<'a, K, V, <D as Durability>::Loc>>

Source§

impl<'a, K: Key, const V: usize, T: Copy + IntoBytes + FromBytes + Immutable, H: TypedWriteHook<K, T>, D: Durability> StrictRows for TreeScan<&'a ZeroTree<K, V, T, H, D>>

Source§

type TryRows = InfallibleRows<K, T, ZeroTreeRowIter<'a, K, V, T, <D as Durability>::Loc>>