1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
// // Sysinfo // // Copyright (c) 2017 Guillaume Gomez // use DiskExt; use DiskType; use std::ffi::OsStr; use std::path::Path; /// Struct containing a disk information. pub struct Disk {} impl DiskExt for Disk { fn get_type(&self) -> DiskType { unreachable!() } fn get_name(&self) -> &OsStr { unreachable!() } fn get_file_system(&self) -> &[u8] { &[] } fn get_mount_point(&self) -> &Path { Path::new("") } fn get_total_space(&self) -> u64 { 0 } fn get_available_space(&self) -> u64 { 0 } fn refresh(&mut self) -> bool { true } }