Struct libmount::Overlay [−][src]
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]
impl Overlay
pub fn readonly<'x, I, T>(dirs: I, target: T) -> Overlay where
I: Iterator<Item = &'x Path>,
T: AsRef<Path>,
[src]
pub fn readonly<'x, I, T>(dirs: I, target: T) -> Overlay where
I: Iterator<Item = &'x Path>,
T: AsRef<Path>,
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]
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>,
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]
pub fn bare_mount(self) -> Result<(), OSError>
Execute an overlay mount
pub fn mount(self) -> Result<(), Error>
[src]
pub fn mount(self) -> Result<(), Error>
Execute an overlay mount and explain the error immediately
Trait Implementations
impl Debug for Overlay
[src]
impl Debug for Overlay
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Overlay
[src]
impl Clone for Overlay
fn clone(&self) -> Overlay
[src]
fn clone(&self) -> Overlay
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Display for Overlay
[src]
impl Display for Overlay