pub struct PageData { /* private fields */ }Expand description
Raw page data as an owned byte buffer.
The length always matches the database page size.
Uses Arc for cheap cloning (Copy-On-Write).
Implementations§
Source§impl PageData
impl PageData
Sourcepub fn from_vec(data: Vec<u8>) -> Self
pub fn from_vec(data: Vec<u8>) -> Self
Create from existing bytes. The caller must ensure the length matches the page size.
Sourcepub fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
pub fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
Get the page data as a mutable byte slice.
This performs a clone if the data is shared (Copy-On-Write).
Trait Implementations§
impl Eq for PageData
impl StructuralPartialEq for PageData
Auto Trait Implementations§
impl Freeze for PageData
impl RefUnwindSafe for PageData
impl Send for PageData
impl Sync for PageData
impl Unpin for PageData
impl UnsafeUnpin for PageData
impl UnwindSafe for PageData
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