pub struct BlockDevice { /* private fields */ }Expand description
A sector-addressed block device.
Implementations§
Source§impl BlockDevice
impl BlockDevice
Sourcepub fn from_file(path: impl AsRef<Path>) -> Result<BlockDevice>
pub fn from_file(path: impl AsRef<Path>) -> Result<BlockDevice>
A device backed by the contents of a host file.
Sourcepub fn sector_count(&self) -> i64
pub fn sector_count(&self) -> i64
How many whole or partial sectors the image contains.
Trait Implementations§
Source§impl Device for BlockDevice
impl Device for BlockDevice
Auto Trait Implementations§
impl Freeze for BlockDevice
impl RefUnwindSafe for BlockDevice
impl Send for BlockDevice
impl Sync for BlockDevice
impl Unpin for BlockDevice
impl UnsafeUnpin for BlockDevice
impl UnwindSafe for BlockDevice
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