pub struct FsManager { /* private fields */ }Expand description
Filesystem manager
Implementations§
Source§impl FsManager
impl FsManager
Sourcepub fn add_mount(
&mut self,
host_path: impl AsRef<Path>,
guest_path: impl AsRef<Path>,
readonly: bool,
)
pub fn add_mount( &mut self, host_path: impl AsRef<Path>, guest_path: impl AsRef<Path>, readonly: bool, )
Add a mount point
Sourcepub fn setup_default_mounts(
&mut self,
workspace: impl AsRef<Path>,
cache: impl AsRef<Path>,
) -> Result<()>
pub fn setup_default_mounts( &mut self, workspace: impl AsRef<Path>, cache: impl AsRef<Path>, ) -> Result<()>
Setup default mounts for A3S Box
Sourcepub fn mounts(&self) -> &[MountPoint]
pub fn mounts(&self) -> &[MountPoint]
Get all mount points
Sourcepub async fn apply_mounts(&self) -> Result<()>
pub async fn apply_mounts(&self) -> Result<()>
Validate and log all configured mounts.
The actual virtio-fs device setup is handled by the shim via InstanceSpec.
This method validates that mount source paths exist on the host.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FsManager
impl RefUnwindSafe for FsManager
impl Send for FsManager
impl Sync for FsManager
impl Unpin for FsManager
impl UnsafeUnpin for FsManager
impl UnwindSafe for FsManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> 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>
Converts
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>
Converts
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