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§

Where this block device originates.

The mount point of this block device, if it is mounted.

Provided Methods§

The sys path of the block device.

Checks if the device is a read-only device.

Checks if the device is a removable device.

Notes

This is only applicable for disk devices.

Checks if the device is a rotational device.

Notes

This is only applicable for disk devices.

Implementors§