pub struct BTreeLeafPage {
pub slot_count: usize,
pub tuple_scheme: TupleScheme,
/* private fields */
}
Fields§
§slot_count: usize
§tuple_scheme: TupleScheme
Implementations§
Source§impl BTreeLeafPage
impl BTreeLeafPage
pub fn new( page_id: &BTreePageID, bytes: Vec<u8>, tuple_scheme: &TupleScheme, key_field: usize, ) -> Self
pub fn set_right_sibling_pid(&mut self, pid: Option<BTreePageID>)
pub fn get_right_sibling_pid(&self) -> Option<BTreePageID>
Sourcepub fn get_max_tuples(scheme: &TupleScheme) -> usize
pub fn get_max_tuples(scheme: &TupleScheme) -> usize
Retrieve the maximum number of tuples this page can hold.
pub fn empty_slots_count(&self) -> usize
Sourcepub fn tuples_count(&self) -> usize
pub fn tuples_count(&self) -> usize
Returns the number of tuples currently stored on this page
pub fn get_header_size(slot_count: usize) -> usize
Sourcepub fn insert_tuple(&mut self, tuple: &Tuple)
pub fn insert_tuple(&mut self, tuple: &Tuple)
Adds the specified tuple to the page such that all records remain in sorted order; the tuple should be updated to reflect that it is now stored on this page. tuple: The tuple to add.
pub fn get_tuple(&self, slot_index: usize) -> Option<Tuple>
pub fn delete_tuple(&mut self, slot_index: &usize)
Sourcepub fn is_slot_used(&self, slot_index: usize) -> bool
pub fn is_slot_used(&self, slot_index: usize) -> bool
Returns true if associated slot on this page is filled.
pub fn mark_slot_status(&mut self, slot_index: usize, used: bool)
Methods from Deref<Target = BTreeBasePage>§
pub fn get_pid(&self) -> BTreePageID
pub fn get_parent_pid(&self) -> BTreePageID
pub fn set_parent_pid(&mut self, pid: &BTreePageID)
Trait Implementations§
Source§impl Deref for BTreeLeafPage
impl Deref for BTreeLeafPage
Auto Trait Implementations§
impl Freeze for BTreeLeafPage
impl RefUnwindSafe for BTreeLeafPage
impl Send for BTreeLeafPage
impl Sync for BTreeLeafPage
impl Unpin for BTreeLeafPage
impl UnwindSafe for BTreeLeafPage
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