pub struct BTreeHeaderPage { /* private fields */ }Expand description
§Binary Layout
- 4 bytes: page category
- n bytes: header
Implementations§
Source§impl BTreeHeaderPage
impl BTreeHeaderPage
pub fn new(pid: &BTreePageID, bytes: &[u8]) -> BTreeHeaderPage
pub fn new_empty_page(pid: &BTreePageID) -> BTreeHeaderPage
pub fn mark_slot_status(&mut self, slot_index: usize, used: bool)
pub fn get_slots_count(&self) -> usize
pub fn get_empty_slot(&self) -> Option<u32>
Trait Implementations§
Source§impl BTreePage for BTreeHeaderPage
impl BTreePage for BTreeHeaderPage
fn new( pid: &BTreePageID, bytes: &[u8], _tuple_scheme: &Schema, _key_field: usize, ) -> Self
fn get_pid(&self) -> BTreePageID
fn get_parent_pid(&self) -> BTreePageID
fn set_parent_pid(&mut self, pid: &BTreePageID)
Source§fn get_page_data(&self) -> Vec<u8> ⓘ
fn get_page_data(&self) -> Vec<u8> ⓘ
Generates a byte array representing the contents of this page.
Used to serialize this page to disk. Read more
fn set_before_image(&mut self)
Source§fn get_before_image(&self) -> Vec<u8> ⓘ
fn get_before_image(&self) -> Vec<u8> ⓘ
Provide a representation of this page before any modifications
were made to it. Used by recovery.
fn peek(&self)
Auto Trait Implementations§
impl Freeze for BTreeHeaderPage
impl RefUnwindSafe for BTreeHeaderPage
impl Send for BTreeHeaderPage
impl Sync for BTreeHeaderPage
impl Unpin for BTreeHeaderPage
impl UnwindSafe for BTreeHeaderPage
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