pub struct FrameGuard { /* private fields */ }Expand description
RAII wrapper for physical frames
Automatically returns frames to the allocator when dropped
Implementations§
Source§impl FrameGuard
impl FrameGuard
Sourcepub fn new(frame: PhysicalFrame, allocator: &'static FrameAllocator) -> Self
pub fn new(frame: PhysicalFrame, allocator: &'static FrameAllocator) -> Self
Create a new frame guard
Sourcepub fn leak(self) -> PhysicalFrame
pub fn leak(self) -> PhysicalFrame
Release ownership of the frame without deallocating
Methods from Deref<Target = PhysicalFrame>§
pub fn number(&self) -> FrameNumber
pub fn addr(&self) -> usize
Trait Implementations§
Source§impl Drop for FrameGuard
impl Drop for FrameGuard
Source§impl Deref for FrameGuard
impl Deref for FrameGuard
Auto Trait Implementations§
impl Freeze for FrameGuard
impl !RefUnwindSafe for FrameGuard
impl Send for FrameGuard
impl Sync for FrameGuard
impl Unpin for FrameGuard
impl !UnwindSafe for FrameGuard
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,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more