pub struct Disk { /* private fields */ }Implementations§
Source§impl Disk
impl Disk
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn mount_partition_by_label( &self, label: &str, flags: MsFlags, ) -> Result<Mount>
Sourcepub fn get_busy_partitions(self) -> Result<Vec<Partition>>
pub fn get_busy_partitions(self) -> Result<Vec<Partition>>
Return an empty list if we have exclusive access to the device, or a list of partitions preventing us from gaining exclusive access.
Sourcepub fn get_partition_table(&self) -> Result<Box<dyn PartTable>>
pub fn get_partition_table(&self) -> Result<Box<dyn PartTable>>
Get a handle to the set of device nodes for individual partitions of the device.
pub fn is_dm_device(&self) -> bool
pub fn is_luks_integrity(&self) -> Result<bool>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Disk
impl RefUnwindSafe for Disk
impl Send for Disk
impl Sync for Disk
impl Unpin for Disk
impl UnwindSafe for Disk
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