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§

Device error type.

Required Methods§

Get status of device.

Initialize device.

Read data blocks from device by address.

Write data blocks to device by address.

Make ioctl query to device.

Provided Methods§

Reset device (optional).

Implementors§