pub struct FatStatistics {Show 13 fields
pub fat_type: FatType,
pub total_clusters: u32,
pub free_clusters: u32,
pub used_clusters: u32,
pub bad_clusters: u32,
pub reserved_clusters: u32,
pub cluster_size: usize,
pub sector_size: usize,
pub total_capacity: u64,
pub used_space: u64,
pub free_space: u64,
pub file_count: u32,
pub directory_count: u32,
}Expand description
Statistics about a FAT filesystem.
Fields§
§fat_type: FatTypeFAT type (FAT12, FAT16, or FAT32)
total_clusters: u32Total number of clusters in the filesystem
free_clusters: u32Number of free clusters
used_clusters: u32Number of used clusters
bad_clusters: u32Number of bad clusters
reserved_clusters: u32Number of reserved clusters (0 and 1)
cluster_size: usizeCluster size in bytes
sector_size: usizeSector size in bytes
total_capacity: u64Total filesystem capacity in bytes
used_space: u64Used space in bytes
free_space: u64Free space in bytes
file_count: u32Total number of files (not including directories)
directory_count: u32Total number of directories
Implementations§
Source§impl FatStatistics
impl FatStatistics
Sourcepub fn used_percentage(&self) -> f64
pub fn used_percentage(&self) -> f64
Calculate the percentage of used space.
Sourcepub fn free_percentage(&self) -> f64
pub fn free_percentage(&self) -> f64
Calculate the percentage of free space.
Trait Implementations§
Source§impl Clone for FatStatistics
impl Clone for FatStatistics
Source§fn clone(&self) -> FatStatistics
fn clone(&self) -> FatStatistics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FatStatistics
impl RefUnwindSafe for FatStatistics
impl Send for FatStatistics
impl Sync for FatStatistics
impl Unpin for FatStatistics
impl UnsafeUnpin for FatStatistics
impl UnwindSafe for FatStatistics
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