[−][src]Struct proc_mounts::MountList
A list of parsed mount entries from /proc/mounts
.
Methods
impl MountList
[src]
pub fn parse_from<'a, I: Iterator<Item = &'a str>>(
lines: I
) -> Result<MountList>
[src]
lines: I
) -> Result<MountList>
Parse mounts given from an iterator of mount entry lines.
pub fn new() -> Result<MountList>
[src]
Read a new list of mounts into memory from /proc/mounts
.
pub fn new_from_file<P: AsRef<Path>>(path: P) -> Result<MountList>
[src]
Read a new list of mounts into memory from any mount-tab-like file.
pub fn new_from_reader<R: BufRead>(reader: R) -> Result<MountList>
[src]
Read a new list of mounts into memory from any mount-tab-like file.
pub fn source_mounted_at<D: AsRef<Path>, P: AsRef<Path>>(
&self,
source: D,
path: P
) -> bool
[src]
&self,
source: D,
path: P
) -> bool
pub fn get_mount_by_dest<P: AsRef<Path>>(&self, path: P) -> Option<&MountInfo>
[src]
Find the first mount which which has the path
destination.
pub fn get_mount_by_source<P: AsRef<Path>>(&self, path: P) -> Option<&MountInfo>
[src]
Find the first mount hich has the source path
.
pub fn source_starts_with<'a>(
&'a self,
path: &'a Path
) -> Box<dyn Iterator<Item = &MountInfo> + 'a>
[src]
&'a self,
path: &'a Path
) -> Box<dyn Iterator<Item = &MountInfo> + 'a>
Iterate through each source that starts with the given path
.
pub fn destination_starts_with<'a>(
&'a self,
path: &'a Path
) -> Box<dyn Iterator<Item = &MountInfo> + 'a>
[src]
&'a self,
path: &'a Path
) -> Box<dyn Iterator<Item = &MountInfo> + 'a>
Iterate through each destination that starts with the given path
.
Trait Implementations
impl Default for MountList
[src]
impl Clone for MountList
[src]
fn clone(&self) -> MountList
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for MountList
[src]
impl PartialEq<MountList> for MountList
[src]
impl Debug for MountList
[src]
impl Hash for MountList
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,