Trait diskio::DiskioDevice
source · pub trait DiskioDevice {
type HardwareError;
fn status(&self) -> Status;
fn initialize(&mut self) -> Result<(), Error<Self::HardwareError>>;
fn read(
&self,
buf: &mut [u8],
lba: Lba
) -> Result<(), Error<Self::HardwareError>>;
fn write(
&self,
buf: &[u8],
lba: Lba
) -> Result<(), Error<Self::HardwareError>>;
fn ioctl(&self, cmd: IoctlCmd<'_>) -> Result<(), Error<Self::HardwareError>>;
fn reset(&mut self) { ... }
}
Expand description
Represents disk IO device.
Required Associated Types§
sourcetype HardwareError
type HardwareError
Device error type.
Required Methods§
sourcefn initialize(&mut self) -> Result<(), Error<Self::HardwareError>>
fn initialize(&mut self) -> Result<(), Error<Self::HardwareError>>
Initialize device.
sourcefn read(&self, buf: &mut [u8], lba: Lba) -> Result<(), Error<Self::HardwareError>>
fn read(&self, buf: &mut [u8], lba: Lba) -> Result<(), Error<Self::HardwareError>>
Read data blocks from device by address.