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.
Auto Trait Implementations§
impl Freeze for SupportedFilesystems
impl RefUnwindSafe for SupportedFilesystems
impl Send for SupportedFilesystems
impl Sync for SupportedFilesystems
impl Unpin for SupportedFilesystems
impl UnwindSafe for SupportedFilesystems
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