pub struct Difference<A, B> { /* private fields */ }Expand description
Cursor combinator yielding full ∖ delta: every key from full that is
absent from delta. Generic over any two SortedCursors with the same
key type — works for SortedVecCursor, BPlusCursor, or nested
combinators, with no coupling to a backend. Itself a SortedCursor, so
leapfrog consumes it like any other cursor.
Used by semi-naive evaluation to restrict an atom to “old” nodes
(full ∖ delta) without materialising a third index.
Invariant: after construction and after every step/seek, the full
sub-cursor points at a non-excluded key or is exhausted, so key() just
reads full. Relies on leapfrog’s monotonic-forward seeks — the delta
sub-cursor only ever advances, never rewinds. Cost is O(|full|+|delta|)
across a full scan.
Implementations§
Source§impl<K, A, B> Difference<A, B>
impl<K, A, B> Difference<A, B>
Trait Implementations§
Source§impl<K, A, B> SortedCursor for Difference<A, B>
impl<K, A, B> SortedCursor for Difference<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Difference<A, B>
impl<A, B> RefUnwindSafe for Difference<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Difference<A, B>
impl<A, B> Sync for Difference<A, B>
impl<A, B> Unpin for Difference<A, B>
impl<A, B> UnsafeUnpin for Difference<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for Difference<A, B>where
A: UnwindSafe,
B: UnwindSafe,
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