[][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 Default for MountList[src]

impl Clone for 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]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for MountList

impl Sync for MountList

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.