Trait disk_types::BlockDeviceExt
source · pub trait BlockDeviceExt {
fn get_device_path(&self) -> &Path;
fn get_mount_point(&self) -> Option<&Path>;
fn sys_block_path(&self) -> PathBuf { ... }
fn is_read_only(&self) -> bool { ... }
fn is_removable(&self) -> bool { ... }
fn is_rotational(&self) -> bool { ... }
}
Expand description
Methods that all block devices share, whether they are partitions or disks.
This trait is required to implement other disk traits.
Required Methods§
sourcefn get_device_path(&self) -> &Path
fn get_device_path(&self) -> &Path
Where this block device originates.
sourcefn get_mount_point(&self) -> Option<&Path>
fn get_mount_point(&self) -> Option<&Path>
The mount point of this block device, if it is mounted.
Provided Methods§
sourcefn sys_block_path(&self) -> PathBuf
fn sys_block_path(&self) -> PathBuf
The sys path of the block device.
sourcefn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Checks if the device is a read-only device.