pub struct Overlay { /* private fields */ }
Expand description
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.
Implementations§
Source§impl Overlay
impl Overlay
Sourcepub fn readonly<'x, I, T>(dirs: I, target: T) -> Overlay
pub fn readonly<'x, I, T>(dirs: I, target: T) -> Overlay
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.
Sourcepub fn writable<'x, I, B, C, D>(
lowerdirs: I,
upperdir: B,
workdir: C,
target: D,
) -> Overlay
pub fn writable<'x, I, B, C, D>( lowerdirs: I, upperdir: B, workdir: C, target: D, ) -> Overlay
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.
Sourcepub fn bare_mount(self) -> Result<(), OSError>
pub fn bare_mount(self) -> Result<(), OSError>
Execute an overlay mount
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Overlay
impl RefUnwindSafe for Overlay
impl Send for Overlay
impl Sync for Overlay
impl Unpin for Overlay
impl UnwindSafe for Overlay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more