pub trait PagedDevice {
// Required methods
async fn sequential_read(
&self,
start: u64,
list: &[PhysRange],
) -> Result<usize>;
async fn sequential_write(
&self,
start: u64,
list: &[PhysRange],
) -> Result<usize>;
async fn len(&self) -> Result<usize>;
// Provided methods
async fn phys_addrs(
&self,
_start: DevicePage,
_phys_list: &mut Vec<PagedPhysMem, MAYHEAP_LEN>,
) -> Result<usize> { ... }
fn yield_now(&self) { ... }
fn run_async<R: 'static>(&self, f: impl Future<Output = R>) -> R { ... }
}
Required Methods§
async fn sequential_read(&self, start: u64, list: &[PhysRange]) -> Result<usize>
async fn sequential_write( &self, start: u64, list: &[PhysRange], ) -> Result<usize>
async fn len(&self) -> Result<usize>
Provided Methods§
Sourceasync fn phys_addrs(
&self,
_start: DevicePage,
_phys_list: &mut Vec<PagedPhysMem, MAYHEAP_LEN>,
) -> Result<usize>
async fn phys_addrs( &self, _start: DevicePage, _phys_list: &mut Vec<PagedPhysMem, MAYHEAP_LEN>, ) -> Result<usize>
Append the needed paged phys mem for this device page, return the number of appended pages.
fn yield_now(&self)
fn run_async<R: 'static>(&self, f: impl Future<Output = R>) -> R
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.