Trait AddressSpaceTy

Source
pub trait AddressSpaceTy: Sealed {
    type PageTable<'a>;

    // Required methods
    fn get_page_table(&self) -> Self::PageTable<'_>;
    fn translate_page(
        table: &mut Self::PageTable<'_>,
        page: Page,
    ) -> Option<Frame>;
    fn map_page(
        table: &mut Self::PageTable<'_>,
        page: Page,
        frame: Frame,
        reason: u16,
        protection: Protection,
    ) -> Result<(), MapPageError>;
    fn unmap_page(table: &mut Self::PageTable<'_>, page: Page) -> Result<(), ()>;
    fn allocate_contiguous(&self, len: usize) -> Result<Page, AllocError>;
    fn allocate_contiguous_at(
        &self,
        at: Page,
        len: usize,
    ) -> Result<Page, AllocError>;
    fn deallocate_contiguous(&self, base: Page, len: usize);
}
🔬This is a nightly-only experimental API. (kernel_mmap_config #24)

Required Associated Types§

Source

type PageTable<'a>

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)

Required Methods§

Source

fn get_page_table(&self) -> Self::PageTable<'_>

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)
Source

fn translate_page(table: &mut Self::PageTable<'_>, page: Page) -> Option<Frame>

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)
Source

fn map_page( table: &mut Self::PageTable<'_>, page: Page, frame: Frame, reason: u16, protection: Protection, ) -> Result<(), MapPageError>

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)
Source

fn unmap_page(table: &mut Self::PageTable<'_>, page: Page) -> Result<(), ()>

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)
Source

fn allocate_contiguous(&self, len: usize) -> Result<Page, AllocError>

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)
Source

fn allocate_contiguous_at( &self, at: Page, len: usize, ) -> Result<Page, AllocError>

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)
Source

fn deallocate_contiguous(&self, base: Page, len: usize)

🔬This is a nightly-only experimental API. (kernel_mmap_config #24)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§