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§
Required Methods§
fn get_page_table(&self) -> Self::PageTable<'_>
🔬This is a nightly-only experimental API. (
kernel_mmap_config
#24)fn translate_page(table: &mut Self::PageTable<'_>, page: Page) -> Option<Frame>
🔬This is a nightly-only experimental API. (
kernel_mmap_config
#24)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)fn unmap_page(table: &mut Self::PageTable<'_>, page: Page) -> Result<(), ()>
🔬This is a nightly-only experimental API. (
kernel_mmap_config
#24)fn allocate_contiguous(&self, len: usize) -> Result<Page, AllocError>
🔬This is a nightly-only experimental API. (
kernel_mmap_config
#24)fn allocate_contiguous_at( &self, at: Page, len: usize, ) -> Result<Page, AllocError>
🔬This is a nightly-only experimental API. (
kernel_mmap_config
#24)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.