Struct radarbase::page_manager::PageManager
source · pub(crate) struct PageManager {
next_free_page: RefCell<u64>,
mmap: RefCell<MmapMut>,
}
Fields§
§next_free_page: RefCell<u64>
§mmap: RefCell<MmapMut>
Implementations§
source§impl PageManager
impl PageManager
pub(crate) const fn state_size() -> usize
pub(crate) fn initialize(output: &mut [u8])
sourcepub(crate) fn restore(mmap: MmapMut, state_offset: usize) -> Self
pub(crate) fn restore(mmap: MmapMut, state_offset: usize) -> Self
Restore the page manager from the given memory map.
pub(crate) fn fsync(&self) -> Result<(), Error>
sourcepub(crate) fn get_page(&self, page_number: u64) -> Page<'_>
pub(crate) fn get_page(&self, page_number: u64) -> Page<'_>
Returns a reference to the page with the specified number.
pub(crate) fn get_metapage_mut(&self) -> PageMut<'_>
sourcefn get_page_mut(&self, page_number: u64) -> PageMut<'_>
fn get_page_mut(&self, page_number: u64) -> PageMut<'_>
Returns a mutable reference to the page with the specified number.
pub(crate) fn allocate(&self) -> PageMut<'_>
pub(crate) fn store_state(&self, output: &mut [u8])
Auto Trait Implementations§
impl !RefUnwindSafe for PageManager
impl Send for PageManager
impl !Sync for PageManager
impl Unpin for PageManager
impl UnwindSafe for PageManager
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