pub struct BTreeRootPointerPage { /* private fields */ }
Expand description
§Binary Layout
- 4 bytes: page category
- 4 bytes: root page index
- 4 bytes: root page category (leaf/internal)
- 4 bytes: header page index
Implementations§
Source§impl BTreeRootPointerPage
impl BTreeRootPointerPage
pub fn new_empty_page(pid: &BTreePageID) -> Self
pub fn get_root_pid(&self) -> BTreePageID
pub fn set_root_pid(&mut self, pid: &BTreePageID)
Sourcepub fn get_header_pid(&self) -> Option<BTreePageID>
pub fn get_header_pid(&self) -> Option<BTreePageID>
Get the id of the first header page
Sourcepub fn set_header_pid(&mut self, pid: &BTreePageID)
pub fn set_header_pid(&mut self, pid: &BTreePageID)
Set the page id of the first header page
Trait Implementations§
Source§impl BTreePage for BTreeRootPointerPage
impl BTreePage for BTreeRootPointerPage
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 BTreeRootPointerPage
impl RefUnwindSafe for BTreeRootPointerPage
impl Send for BTreeRootPointerPage
impl Sync for BTreeRootPointerPage
impl Unpin for BTreeRootPointerPage
impl UnwindSafe for BTreeRootPointerPage
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