Struct driver_virtio::VirtIoBlkDev
source · pub struct VirtIoBlkDev<H: Hal, T: Transport> { /* private fields */ }
Available on crate feature
block
only.Expand description
The VirtIO block device driver.
Implementations§
Trait Implementations§
source§impl<H: Hal, T: Transport> BaseDriverOps for VirtIoBlkDev<H, T>
impl<H: Hal, T: Transport> BaseDriverOps for VirtIoBlkDev<H, T>
source§fn device_name(&self) -> &str
fn device_name(&self) -> &str
The name of the device.
source§fn device_type(&self) -> DeviceType
fn device_type(&self) -> DeviceType
The type of the device.
source§impl<H: Hal, T: Transport> BlockDriverOps for VirtIoBlkDev<H, T>
impl<H: Hal, T: Transport> BlockDriverOps for VirtIoBlkDev<H, T>
source§fn num_blocks(&self) -> u64
fn num_blocks(&self) -> u64
The number of blocks in this storage device. Read more
source§fn block_size(&self) -> usize
fn block_size(&self) -> usize
The size of each block in bytes.
source§fn read_block(&mut self, block_id: u64, buf: &mut [u8]) -> DevResult
fn read_block(&mut self, block_id: u64, buf: &mut [u8]) -> DevResult
Reads blocked data from the given block. Read more
impl<H: Hal, T: Transport> Send for VirtIoBlkDev<H, T>
impl<H: Hal, T: Transport> Sync for VirtIoBlkDev<H, T>
Auto Trait Implementations§
impl<H, T> RefUnwindSafe for VirtIoBlkDev<H, T>where
H: RefUnwindSafe,
T: RefUnwindSafe,
impl<H, T> Unpin for VirtIoBlkDev<H, T>
impl<H, T> UnwindSafe for VirtIoBlkDev<H, T>where
H: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more