pub trait Mappable {
// Required methods
fn physical_length_to_virtual_length(
&self,
physical_length: NonZero<usize>,
) -> NonZero<usize>;
fn physical_start_offset_from_virtual(&self) -> isize;
}
🔬This is a nightly-only experimental API. (
kernel_mmap_trait
#24)Available on non-crate feature
use_std
only.Expand description
Basic operations to decide how to map memory together.
Implementations of this can be used to instantiate a RawMapping
.
Required Methods§
Sourcefn physical_length_to_virtual_length(
&self,
physical_length: NonZero<usize>,
) -> NonZero<usize>
🔬This is a nightly-only experimental API. (kernel_mmap_trait
#24)
fn physical_length_to_virtual_length( &self, physical_length: NonZero<usize>, ) -> NonZero<usize>
kernel_mmap_trait
#24)The amount of virtual memory required to create a mapping with physical_length
Frame
s
Sourcefn physical_start_offset_from_virtual(&self) -> isize
🔬This is a nightly-only experimental API. (kernel_mmap_trait
#24)
fn physical_start_offset_from_virtual(&self) -> isize
kernel_mmap_trait
#24)The number of Page
s to offset the physical memory into the allocated virtual memory