pub enum SessionHolder {
Host(HostSandboxSession),
Gamma(GammaSession),
}Expand description
Active VM / sandbox backend for one REPL or script run.
Variants§
Implementations§
Source§impl SessionHolder
impl SessionHolder
Sourcepub fn try_from_config(config: &VmConfig) -> Result<Self, VmError>
pub fn try_from_config(config: &VmConfig) -> Result<Self, VmError>
Build session from config.
§Errors
On Unix, DEVSHELL_VM_BACKEND=lima uses GammaSession; fails with VmError::Lima if limactl is missing.
On non-Unix, lima returns VmError::BackendNotImplemented.
pub fn ensure_ready(&mut self, vfs: &Vfs, vfs_cwd: &str) -> Result<(), VmError>
pub fn run_rust_tool( &mut self, vfs: &mut Vfs, vfs_cwd: &str, program: &str, args: &[String], ) -> Result<ExitStatus, VmError>
pub fn shutdown(&mut self, vfs: &mut Vfs, vfs_cwd: &str) -> Result<(), VmError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionHolder
impl RefUnwindSafe for SessionHolder
impl Send for SessionHolder
impl Sync for SessionHolder
impl Unpin for SessionHolder
impl UnsafeUnpin for SessionHolder
impl UnwindSafe for SessionHolder
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