Struct sys_mount::SupportedFilesystems
source · pub struct SupportedFilesystems { /* private fields */ }
Expand description
Data structure for validating if a filesystem argument is valid, and used within automatic file system mounting.
Implementations§
source§impl SupportedFilesystems
impl SupportedFilesystems
sourcepub fn is_supported(&self, fs: &str) -> bool
pub fn is_supported(&self, fs: &str) -> bool
Check if a provided file system is valid on this system.
extern crate sys_mount;
use sys_mount::SupportedFilesystems;
fn main() {
let supports = SupportedFilesystems::new().unwrap();
println!("btrfs is {}", if supports.is_supported("btrfs") {
"supported"
} else {
"not supported"
});
}
sourcepub fn nodev_file_systems<'a>(&'a self) -> Box<dyn Iterator<Item = &str> + 'a>
pub fn nodev_file_systems<'a>(&'a self) -> Box<dyn Iterator<Item = &str> + 'a>
Iterate through file systems which are not associated with physical devices.
sourcepub fn dev_file_systems<'a>(&'a self) -> Box<dyn Iterator<Item = &str> + 'a>
pub fn dev_file_systems<'a>(&'a self) -> Box<dyn Iterator<Item = &str> + 'a>
Iterate through file systems which are associated with physical devices.
Trait Implementations§
source§impl Clone for SupportedFilesystems
impl Clone for SupportedFilesystems
source§fn clone(&self) -> SupportedFilesystems
fn clone(&self) -> SupportedFilesystems
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SupportedFilesystems
impl Debug for SupportedFilesystems
source§impl<'a> From<&'a SupportedFilesystems> for FilesystemType<'a>
impl<'a> From<&'a SupportedFilesystems> for FilesystemType<'a>
source§fn from(s: &'a SupportedFilesystems) -> Self
fn from(s: &'a SupportedFilesystems) -> Self
Converts to this type from the input type.