Struct libmount::BindMount
[−]
[src]
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:
- This makes additional
mountcall (Remount().readonly()) - If remount fails mount bind is left on the filesystem, no cleanup is done
- If set to
falseis option is no-op (does not remountrw)
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 Debug for BindMount[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Clone for BindMount[src]
fn clone(&self) -> BindMount[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more