Skip to main content

layer_from_fs

Function layer_from_fs 

Source
pub fn layer_from_fs<L>(fs: L) -> Arc<BoxedLayer> ⓘ
where L: Layer<Inode = u64, Handle = u64> + Send + Sync + 'static,
Expand description

Wrap any fuse_backend_rs [Layer] (a FileSystem that also implements the overlay Layer trait) as a BoxedLayer usable by rootfs_overlay.

This is the generic seam FS-B uses to plug an in-process RAFS lower (nydus_rafs::fs::Rafs, which implements Layer) into the overlay without this crate depending on nydus-rafs: the caller owns the RAFS type, we only require it be a Layer<Inode = u64, Handle = u64>. The layer must already be ready to serve (RAFS: imported; PassthroughFs: imported).