pub struct FilesystemSnapshot {
pub mount_point: Box<str>,
pub device: Option<Box<str>>,
pub fs_type: Option<Box<str>>,
pub total_bytes: u64,
pub available_bytes: MetricState<u64>,
pub used_bytes: MetricState<u64>,
pub usage: MetricState<Percent>,
pub inodes: MetricState<InodeUsage>,
pub kind: FilesystemKind,
pub read_only: bool,
}Expand description
Capacity of one mounted filesystem.
Contains no throughput fields at all; that is DiskSnapshot’s job.
Fields§
§mount_point: Box<str>Where it is mounted.
device: Option<Box<str>>The backing device, where the platform maps it.
fs_type: Option<Box<str>>Filesystem type, e.g. apfs, ext4, overlay.
total_bytes: u64Total capacity.
available_bytes: MetricState<u64>Space available to the current user.
Usually smaller than total - used because of reserved blocks.
used_bytes: MetricState<u64>Space in use.
usage: MetricState<Percent>Share of capacity used. Never mixed with device utilization (§7.3).
inodes: MetricState<InodeUsage>Inode occupancy, where the filesystem has an inode table to report.
A medium-tier read like the byte capacity, and from the same statfs
call — sysinfo does not expose f_files, so it is the native layers that
fill this in and the baseline that leaves it MetricState::Unsupported.
kind: FilesystemKindHow the mount is classified.
read_only: boolWhether the mount is read-only.
Implementations§
Source§impl FilesystemSnapshot
impl FilesystemSnapshot
Sourcepub fn inode_usage(&self) -> MetricState<Percent>
pub fn inode_usage(&self) -> MetricState<Percent>
Share of the inode table in use, carrying the inode read’s own availability.
The percentage a display wants: a refused or absent inode count produces a state and never a number, and a retained count produces a percentage that is marked stale exactly as the count was (§4).
Trait Implementations§
Source§impl Clone for FilesystemSnapshot
impl Clone for FilesystemSnapshot
Source§fn clone(&self) -> FilesystemSnapshot
fn clone(&self) -> FilesystemSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more