pub struct LayeredFsBuilder { /* private fields */ }Expand description
FileSystem builder that allows a set of auxiliary FileSystems to be mounted at specified
paths relative to the base filesystem, regardless of whether the base filesystem has directories
at those paths, that may be mounted-onto.
Auxiliary FileSystems and their mount paths are provided via calls to add(), and the layered
filesystem created using build().
Implementations§
Source§impl LayeredFsBuilder
impl LayeredFsBuilder
Sourcepub fn new(root_fs: FileSystemHandle) -> Self
pub fn new(root_fs: FileSystemHandle) -> Self
Returns a LayeredFsBuilder with root_fs as the underlying base filesystem.
Sourcepub fn add(&mut self, path: &str, fs: FileSystemHandle)
pub fn add(&mut self, path: &str, fs: FileSystemHandle)
Specifies that filesystem fs should be mounted at the specified path relative to the
base filesystem.
path must specify an absolute path under the base filesystem (i.e. starting with “/”).
If path has multiple components then intermediate components must already have been
added to the builder.
Sourcepub fn build<L>(
self,
locked: &mut Locked<L>,
kernel: &Kernel,
) -> (FileSystemHandle, LayeredFsMounts)where
L: LockEqualOrBefore<FileOpsCore>,
pub fn build<L>(
self,
locked: &mut Locked<L>,
kernel: &Kernel,
) -> (FileSystemHandle, LayeredFsMounts)where
L: LockEqualOrBefore<FileOpsCore>,
Returns the new FileSystem handle, and a finalization callback that must be invoked to
set up the subordinate mount points.
The underlying base FileSystem will be returned directly if no sub-mounts were specified
via add(). Otherwise a LayeredFs instance will be returned, to provide stub directory
entries for the sub-mounts to be mounted onto.
Auto Trait Implementations§
impl Freeze for LayeredFsBuilder
impl !RefUnwindSafe for LayeredFsBuilder
impl Send for LayeredFsBuilder
impl Sync for LayeredFsBuilder
impl Unpin for LayeredFsBuilder
impl UnsafeUnpin for LayeredFsBuilder
impl !UnwindSafe for LayeredFsBuilder
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more