pub struct VfsConfig {
pub mount_path: String,
pub dir_perms: DirPerms,
pub file_perms: FilePerms,
pub volumes: Vec<VolumeMount>,
}Available on crate feature
vfs only.Expand description
Configuration for the virtual filesystem (VFS) in a session.
This allows customizing the VFS mount path and permissions.
Fields§
§mount_path: StringThe guest path where VFS storage is mounted (default: “/data”).
dir_perms: DirPermsDirectory permissions for the VFS mount.
file_perms: FilePermsFile permissions for files in the VFS mount.
volumes: Vec<VolumeMount>Host filesystem volume mounts.
Implementations§
Source§impl VfsConfig
impl VfsConfig
Sourcepub fn new(mount_path: impl Into<String>) -> Self
pub fn new(mount_path: impl Into<String>) -> Self
Create a new VFS config with the given mount path.
Uses full read/write permissions by default.
Sourcepub fn with_dir_perms(self, perms: DirPerms) -> Self
pub fn with_dir_perms(self, perms: DirPerms) -> Self
Set directory permissions.
Sourcepub fn with_file_perms(self, perms: FilePerms) -> Self
pub fn with_file_perms(self, perms: FilePerms) -> Self
Set file permissions.
Sourcepub fn with_volume(self, volume: VolumeMount) -> Self
pub fn with_volume(self, volume: VolumeMount) -> Self
Add a host filesystem volume mount.
Sourcepub fn with_volumes(
self,
volumes: impl IntoIterator<Item = VolumeMount>,
) -> Self
pub fn with_volumes( self, volumes: impl IntoIterator<Item = VolumeMount>, ) -> Self
Add multiple host filesystem volume mounts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VfsConfig
impl RefUnwindSafe for VfsConfig
impl Send for VfsConfig
impl Sync for VfsConfig
impl Unpin for VfsConfig
impl UnsafeUnpin for VfsConfig
impl UnwindSafe for VfsConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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