pub struct SharedContainerLayout { /* private fields */ }Expand description
Per-container directory layout within the shared filesystem.
Represents the directory structure for a single container:
{root}/ # shared/containers/{cid}/
├── overlayfs/
│ ├── diff/ # Image layers (lower dirs for overlayfs)
│ ├── upper/ # Overlayfs upper (writable layer)
│ └── work/ # Overlayfs work directory
├── rootfs/ # All rootfs strategies mount here
└── volumes/ # User volumes (virtiofs mounts)
├── {volume-name-1}/
└── {volume-name-2}/Implementations§
Sourcepub fn new(root: impl Into<PathBuf>) -> Self
pub fn new(root: impl Into<PathBuf>) -> Self
Create a container layout with the given root path.
Sourcepub fn overlayfs_dir(&self) -> PathBuf
pub fn overlayfs_dir(&self) -> PathBuf
Overlayfs directory: {root}/overlayfs
Sourcepub fn upper_dir(&self) -> PathBuf
pub fn upper_dir(&self) -> PathBuf
Upper directory: {root}/overlayfs/upper
Writable layer for overlayfs.
Sourcepub fn work_dir(&self) -> PathBuf
pub fn work_dir(&self) -> PathBuf
Work directory: {root}/overlayfs/work
Overlayfs work directory.
Sourcepub fn diff_dir(&self) -> PathBuf
pub fn diff_dir(&self) -> PathBuf
Diff directory: {root}/overlayfs/diff
Contains image layers (lower dirs for overlayfs).
Sourcepub fn rootfs_dir(&self) -> PathBuf
pub fn rootfs_dir(&self) -> PathBuf
Rootfs directory: {root}/rootfs
All rootfs strategies (merged, overlayfs, disk image) mount here. Guest bind mounts /run/boxlite/{cid}/rootfs/ to this location.
Sourcepub fn volumes_dir(&self) -> PathBuf
pub fn volumes_dir(&self) -> PathBuf
Volumes directory: {root}/volumes
Base directory for user volume mounts.
Sourcepub fn volume_dir(&self, volume_name: &str) -> PathBuf
pub fn volume_dir(&self, volume_name: &str) -> PathBuf
Specific volume directory: {root}/volumes/{volume_name}
Convention-based path for a specific user volume. Both host and guest use this to construct volume mount paths.
Sourcepub fn layers_dir(&self) -> PathBuf
pub fn layers_dir(&self) -> PathBuf
Layers directory: {root}/layers
Source directory for image layers (virtiofs mount point). Guest bind-mounts from here to diff_dir for overlayfs.
Trait Implementations§
Source§fn clone(&self) -> SharedContainerLayout
fn clone(&self) -> SharedContainerLayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request