pub trait RootfsProvider: Send + Sync {
// Required methods
fn prepare(&self, box_dir: &Path, cache_dir: &Path) -> Result<PathBuf>;
fn cleanup(&self, box_dir: &Path, persistent: bool) -> Result<()>;
fn name(&self) -> &'static str;
}Expand description
Abstracts how a rootfs directory is prepared for a box from a cached lower layer.
Required Methods§
Sourcefn prepare(&self, box_dir: &Path, cache_dir: &Path) -> Result<PathBuf>
fn prepare(&self, box_dir: &Path, cache_dir: &Path) -> Result<PathBuf>
Prepare a rootfs at box_dir from the cached read-only layer at cache_dir.
Returns the path to use as InstanceSpec.rootfs_path.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".