[][src]Struct proc_mounts::MountList

pub struct MountList(pub Vec<MountInfo>);

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]

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]

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]

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]

Iterate through each destination that starts with the given path.

Trait Implementations

impl Clone for MountList[src]

impl Default for MountList[src]

impl Eq for MountList[src]

impl PartialEq<MountList> for MountList[src]

impl Debug for MountList[src]

impl Hash for MountList[src]

impl StructuralPartialEq for MountList[src]

impl StructuralEq for MountList[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]