#[non_exhaustive]pub struct Disk {
pub mount_point: PathBuf,
pub device: String,
pub label: Option<String>,
pub filesystem: String,
pub kind: DiskKind,
pub space: Option<Space>,
pub read_only: bool,
pub removable: bool,
}Expand description
One mounted filesystem.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mount_point: PathBufWhere it is mounted.
device: StringThe device: /dev/nvme0n1p2, C:, \\?\Volume{...}\.
label: Option<String>The volume label (Windows, macOS).
filesystem: StringThe filesystem type: ext4, btrfs, apfs, NTFS, overlay.
kind: DiskKindWhat kind of storage it is.
space: Option<Space>The space, or None for media not present (an empty card reader) and
network mounts.
read_only: boolMounted read-only.
removable: boolOn removable media.
Trait Implementations§
impl Eq for Disk
impl StructuralPartialEq for Disk
Auto Trait Implementations§
impl Forget for Disk
impl Freeze for Disk
impl RefUnwindSafe for Disk
impl Send for Disk
impl Sync for Disk
impl Unpin for Disk
impl UnsafeUnpin 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