Trait storage_device::StorageController
source · pub trait StorageController {
// Required method
fn devices<'c>(&'c self) -> Box<dyn Iterator<Item = StorageDeviceRef> + 'c>;
}
Expand description
A trait that represents a storage controller, such as an AHCI controller or IDE controller.
Required Methods§
sourcefn devices<'c>(&'c self) -> Box<dyn Iterator<Item = StorageDeviceRef> + 'c>
fn devices<'c>(&'c self) -> Box<dyn Iterator<Item = StorageDeviceRef> + 'c>
Returns an iterator of references to all StorageDevice
s 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>>
.