pub struct VmConfig {
pub enabled: bool,
pub backend: String,
pub eager_start: bool,
pub lima_instance: String,
}Expand description
Parsed VM-related environment.
Fields§
§enabled: boolDEVSHELL_VM enabled.
backend: StringRaw backend string (trimmed); see ENV_DEVSHELL_VM_BACKEND for defaults.
eager_start: boolEager VM/session start when REPL opens (vs lazy on first rustup/cargo).
lima_instance: StringLima instance name.
Implementations§
Source§impl VmConfig
impl VmConfig
Sourcepub fn use_host_sandbox(&self) -> bool
pub fn use_host_sandbox(&self) -> bool
Normalized backend: host and auto use the host temp sandbox; lima uses γ (Unix; see docs/devshell-vm-gamma.md).
Sourcepub fn workspace_mode_effective(&self) -> WorkspaceMode
pub fn workspace_mode_effective(&self) -> WorkspaceMode
Effective workspace mode after combining workspace_mode_from_env with VM availability (guest-primary design §6).
Returns WorkspaceMode::Guest only when the user requested guest, VmConfig::enabled is true,
VmConfig::use_host_sandbox is false, and the backend is lima or beta. Otherwise returns
WorkspaceMode::Sync without erroring.
Trait Implementations§
impl Eq for VmConfig
impl StructuralPartialEq for VmConfig
Auto Trait Implementations§
impl Freeze for VmConfig
impl RefUnwindSafe for VmConfig
impl Send for VmConfig
impl Sync for VmConfig
impl Unpin for VmConfig
impl UnsafeUnpin for VmConfig
impl UnwindSafe for VmConfig
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