Trait PagedDevice

Source
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§

Source

async fn sequential_read(&self, start: u64, list: &[PhysRange]) -> Result<usize>

Source

async fn sequential_write( &self, start: u64, list: &[PhysRange], ) -> Result<usize>

Source

async fn len(&self) -> Result<usize>

Provided Methods§

Source

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.

Source

fn yield_now(&self)

Source

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.

Implementors§