pub struct WorkspaceConfig {
pub host_path: Option<PathBuf>,
pub container_path: PathBuf,
pub mode: WorkspaceMode,
pub allow_execute: bool,
pub staging_path: Option<PathBuf>,
}Expand description
First-class workspace mount configuration.
Fields§
§host_path: Option<PathBuf>Source path on the host. None means no host workspace is mounted, but
/workspace still exists as the default cwd.
container_path: PathBufDestination inside the container. Currently fixed to /workspace.
mode: WorkspaceModeExposure mode for host_path.
allow_execute: boolWhether execution from the workspace is allowed.
staging_path: Option<PathBuf>Private staging directory used for copy-in-out mode.
Implementations§
Source§impl WorkspaceConfig
impl WorkspaceConfig
pub fn new() -> Self
pub fn with_host_path(self, host_path: PathBuf) -> Self
pub fn with_mode(self, mode: WorkspaceMode) -> Self
pub fn with_allow_execute(self, allow_execute: bool) -> Self
pub fn with_staging_path(self, staging_path: PathBuf) -> Self
pub fn is_read_only(&self) -> bool
pub fn is_writable(&self) -> bool
pub fn effective_host_path(&self) -> Option<&PathBuf>
Trait Implementations§
Source§impl Clone for WorkspaceConfig
impl Clone for WorkspaceConfig
Source§fn clone(&self) -> WorkspaceConfig
fn clone(&self) -> WorkspaceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkspaceConfig
impl Debug for WorkspaceConfig
Auto Trait Implementations§
impl Freeze for WorkspaceConfig
impl RefUnwindSafe for WorkspaceConfig
impl Send for WorkspaceConfig
impl Sync for WorkspaceConfig
impl Unpin for WorkspaceConfig
impl UnsafeUnpin for WorkspaceConfig
impl UnwindSafe for WorkspaceConfig
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