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
sourceimpl 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
sourceimpl Clone for SupportedFilesystems
impl Clone for SupportedFilesystems
sourcefn clone(&self) -> SupportedFilesystems
fn clone(&self) -> SupportedFilesystems
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for SupportedFilesystems
impl Debug for SupportedFilesystems
sourceimpl<'a> From<&'a SupportedFilesystems> for FilesystemType<'a>
impl<'a> From<&'a SupportedFilesystems> for FilesystemType<'a>
sourcefn from(s: &'a SupportedFilesystems) -> Self
fn from(s: &'a SupportedFilesystems) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for SupportedFilesystems
impl Send for SupportedFilesystems
impl Sync for SupportedFilesystems
impl Unpin for SupportedFilesystems
impl UnwindSafe for SupportedFilesystems
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more