pub struct Page { /* private fields */ }
Expand description
A Page representation.
Implementations§
source§impl Page
impl Page
sourcepub fn into_raw(self) -> Pa
pub fn into_raw(self) -> Pa
Consumes the page, returning a pa of the page.
After calling this function, the caller is responsible for the memory previously managed by the Page.
In particular, the caller should properly release the page by calling the Page::from_pa
.
sourcepub unsafe fn from_pa(pa: Pa) -> Self
pub unsafe fn from_pa(pa: Pa) -> Self
Constructs a page from a pa.
For this to be safe, the pa must have been taken by Page::into_raw
.
Safety
This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.
Auto Trait Implementations§
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnwindSafe for Page
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
const: unstable§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more