[−][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 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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl StructuralPartialEq for MountList
[src]
impl StructuralEq for MountList
[src]
Auto Trait Implementations
impl Send for MountList
impl Sync for MountList
impl Unpin for MountList
impl UnwindSafe for MountList
impl RefUnwindSafe for MountList
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,