pub trait StorageController {
    // Required method
    fn devices<'c>(
        &'c self
    ) -> Box<dyn Iterator<Item = Arc<Mutex<dyn StorageDevice + Send, Spin>, Global>> + 'c, Global>;
}
Expand description

A trait that represents a storage controller, such as an AHCI controller or IDE controller.

Required Methods§

fn devices<'c>( &'c self ) -> Box<dyn Iterator<Item = Arc<Mutex<dyn StorageDevice + Send, Spin>, Global>> + 'c, Global>

Returns an iterator of references to all StorageDevices attached to this controller. The lifetime of the iterator and the device references it returns are both bound by the lifetime of this StorageController.

Note

I would prefer to have this Iterator return a &StorageDeviceRef, but Rust does not permit casts from &Arc<Mutex<Struct>> to &Arc<Mutex<Trait>>, it only supports casts from Arc<Mutex<Struct>> to Arc<Mutex<Trait>>.

Implementations on Foreign Types§

§

impl StorageController for IdeController

§

fn devices<'c>( &'c self ) -> Box<dyn Iterator<Item = Arc<Mutex<dyn StorageDevice + Send, Spin>, Global>> + 'c, Global>

Implementors§