pub struct TreeLocation {
pub index: i32,
pub ln_key: Option<Vec<u8>>,
pub child_lsn: Lsn,
pub child_logged_size: i32,
pub is_kd: bool,
pub is_embedded: bool,
}Expand description
Cursor-like object tracking a location in a tree.
Used during recovery to track the position being processed and maintain context about the current entry’s attributes.
Fields§
§index: i32Index within the current BIN.
ln_key: Option<Vec<u8>>The key at this location (if known).
child_lsn: LsnLSN of the child at this location.
child_logged_size: i32Logged size of the child entry.
is_kd: boolTrue if this entry is known deleted.
is_embedded: boolTrue if this is an embedded LN.
Implementations§
Source§impl TreeLocation
impl TreeLocation
Sourcepub fn with_index_and_key(index: i32, ln_key: Vec<u8>) -> Self
pub fn with_index_and_key(index: i32, ln_key: Vec<u8>) -> Self
Creates a TreeLocation with specific index and key.
§Arguments
index- The slot index in the BINln_key- The key at this location
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Resets all fields to their default values.
This allows reusing a TreeLocation instance.
Sourcepub fn has_valid_index(&self) -> bool
pub fn has_valid_index(&self) -> bool
Returns true if this location has a valid index.
Sourcepub fn key_as_slice(&self) -> Option<&[u8]>
pub fn key_as_slice(&self) -> Option<&[u8]>
Returns the key as a slice, if present.
Trait Implementations§
Source§impl Clone for TreeLocation
impl Clone for TreeLocation
Source§fn clone(&self) -> TreeLocation
fn clone(&self) -> TreeLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TreeLocation
impl Debug for TreeLocation
Auto Trait Implementations§
impl Freeze for TreeLocation
impl RefUnwindSafe for TreeLocation
impl Send for TreeLocation
impl Sync for TreeLocation
impl Unpin for TreeLocation
impl UnsafeUnpin for TreeLocation
impl UnwindSafe for TreeLocation
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