[][src]Struct libmount::BindMount

pub struct BindMount { /* fields omitted */ }

A mount bind definition

By default bind mount is recursive (it's what you want most of the time).

Also recursive mounts can be used in user namespaces.

Methods

impl BindMount
[src]

pub fn new<A: AsRef<Path>, B: AsRef<Path>>(source: A, target: B) -> BindMount
[src]

Create a new, recursive bind mount

You can disable recursion with a non_recursive() method

pub fn recursive(self, flag: bool) -> BindMount
[src]

Toggle recursion

pub fn readonly(self, flag: bool) -> BindMount
[src]

If set to true makes bind-mount readonly

Few notes:

  1. This makes additional mount call (Remount().readonly())
  2. If remount fails mount bind is left on the filesystem, no cleanup is done
  3. If set to false is option is no-op (does not remount rw)

pub fn bare_mount(self) -> Result<(), OSError>
[src]

Execute a bind mount

pub fn mount(self) -> Result<(), Error>
[src]

Execute a bind mount and explain the error immediately

Trait Implementations

impl Clone for BindMount
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for BindMount
[src]

impl Display for BindMount
[src]

Auto Trait Implementations

impl Send for BindMount

impl Sync for BindMount

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> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[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> 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.

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