pub struct PageMut<'a> { /* private fields */ }Expand description
An exclusive write borrow of a pinned page. Dereferences to Page.
Methods from Deref<Target = Page>§
Sourcepub fn id(&self) -> PageId
pub fn id(&self) -> PageId
The id stamped in the header. For a page from Page::new this is 0
until the page is written to a slot.
Sourcepub fn set_lsn(&mut self, lsn: Lsn)
pub fn set_lsn(&mut self, lsn: Lsn)
Set the log sequence number. Takes effect in the checksum the next time
the page is stamped (on PageFile::write_page).
Sourcepub fn payload_mut(&mut self) -> &mut [u8] ⓘ
pub fn payload_mut(&mut self) -> &mut [u8] ⓘ
The payload, mutably.
Sourcepub fn to_checksummed_bytes(&self) -> Vec<u8> ⓘ
pub fn to_checksummed_bytes(&self) -> Vec<u8> ⓘ
The whole page as a checksummed byte block, ready to persist elsewhere.
The returned vector is page_size bytes with a freshly computed checksum
in the header; feed it back through Page::from_bytes to recover and
verify the page. The stamped id is left untouched (0 unless the page
came from a file).
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Send for PageMut<'a>
impl<'a> Freeze for PageMut<'a>
impl<'a> RefUnwindSafe for PageMut<'a>
impl<'a> Sync for PageMut<'a>
impl<'a> Unpin for PageMut<'a>
impl<'a> UnsafeUnpin for PageMut<'a>
impl<'a> UnwindSafe for PageMut<'a>
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