pub struct SimBlockDevice { /* private fields */ }Expand description
Block device backed by a host file representing a disk image.
Implementations§
Trait Implementations§
Source§impl BlockDevice for SimBlockDevice
impl BlockDevice for SimBlockDevice
Source§fn read_blocks(&mut self, lba: u64, buf: &mut [u8]) -> Result<(), FsError>
fn read_blocks(&mut self, lba: u64, buf: &mut [u8]) -> Result<(), FsError>
Read blocks starting at
lba into buf.Source§fn block_size(&self) -> usize
fn block_size(&self) -> usize
Return the logical block size in bytes.
Source§fn num_blocks(&self) -> u64
fn num_blocks(&self) -> u64
Return the total number of addressable blocks.
Auto Trait Implementations§
impl Freeze for SimBlockDevice
impl RefUnwindSafe for SimBlockDevice
impl Send for SimBlockDevice
impl Sync for SimBlockDevice
impl Unpin for SimBlockDevice
impl UnsafeUnpin for SimBlockDevice
impl UnwindSafe for SimBlockDevice
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