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]
fn new<A: AsRef<Path>, B: AsRef<Path>>(source: A, target: B) -> BindMount
Create a new, recursive bind mount
You can disable recursion with a non_recursive()
method
fn recursive(self, flag: bool) -> BindMount
Toggle recursion
fn readonly(self, flag: bool) -> BindMount
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
)
fn bare_mount(self) -> Result<(), OSError>
Execute a bind mount
fn mount(self) -> Result<(), Error>
Execute a bind mount and explain the error immediately
Trait Implementations
impl Debug for BindMount
[src]
impl Clone for BindMount
[src]
fn clone(&self) -> BindMount
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more