[][src]Struct libmount::Overlay

pub struct Overlay { /* fields omitted */ }

An overlay mount point

This requires linux kernel of at least 3.18.

To use overlayfs in user namespace you need a kernel patch (which is enabled by default in ubuntu). At least this is still true for mainline kernel 4.5.0.

Methods

impl Overlay[src]

pub fn readonly<'x, I, T>(dirs: I, target: T) -> Overlay where
    I: Iterator<Item = &'x Path>,
    T: AsRef<Path>, 
[src]

A constructor for read-only overlayfs mount

You must have at least two directories in the list (for single dir it might be equal to bind mount, but kernel return EINVAL for such options).

The top-most directory will be first in the list.

pub fn writable<'x, I, B, C, D>(
    lowerdirs: I,
    upperdir: B,
    workdir: C,
    target: D
) -> Overlay where
    I: Iterator<Item = &'x Path>,
    B: AsRef<Path>,
    C: AsRef<Path>,
    D: AsRef<Path>, 
[src]

A constructor for writable overlayfs mount

The upperdir and workdir must be on the same filesystem.

The top-most directory will be first in the list of lowerdirs.

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

Execute an overlay mount

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

Execute an overlay mount and explain the error immediately

Trait Implementations

impl Clone for Overlay[src]

impl Display for Overlay[src]

impl Debug for Overlay[src]

Auto Trait Implementations

impl Send for Overlay

impl Sync for Overlay

impl Unpin for Overlay

impl UnwindSafe for Overlay

impl RefUnwindSafe for Overlay

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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