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
pub fn new() -> Result<Self>
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 more
sourceimpl 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
Performs the conversion.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more