pub enum SeekResult {
Found,
NotFound,
TryAdvance,
}Variants§
Found
Record matching the SeekOp found in the B-tree and cursor was positioned to point onto that record
NotFound
Record matching the SeekOp doesn’t exists in the B-tree
TryAdvance
This result can happen only if eq_only for SeekOp is false In this case Seek can position cursor to the leaf page boundaries (before the start, after the end) (e.g. if leaf page holds rows with keys from range [1..10], key 10 is absent and SeekOp is >= 10)
turso-db has this extra SeekResult in order to make [BTreeCursor::seek] method to position cursor at the leaf of potential insertion, but also communicate to caller the fact that current cursor position doesn’t hold a matching entry (necessary for Seek{XX} VM op-codes, so these op-codes will try to advance cursor in order to move it to matching entry)
Trait Implementations§
Source§impl Clone for SeekResult
impl Clone for SeekResult
Source§fn clone(&self) -> SeekResult
fn clone(&self) -> SeekResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SeekResult
Source§impl Debug for SeekResult
impl Debug for SeekResult
Source§impl PartialEq for SeekResult
impl PartialEq for SeekResult
impl StructuralPartialEq for SeekResult
Auto Trait Implementations§
impl Freeze for SeekResult
impl RefUnwindSafe for SeekResult
impl Send for SeekResult
impl Sync for SeekResult
impl Unpin for SeekResult
impl UnsafeUnpin for SeekResult
impl UnwindSafe for SeekResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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