[−][src]Struct libmount::BindMount
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
mount
call (Remount().readonly()
) - If remount fails mount bind is left on the filesystem, no cleanup is done
- If set to
false
is 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
Auto Trait Implementations
impl Send for BindMount
impl Sync for BindMount
impl Unpin for BindMount
impl UnwindSafe for BindMount
impl RefUnwindSafe for BindMount
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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,