pub struct InMemoryVmProvider { /* private fields */ }Expand description
In-memory VM provider for development and testing.
Replace with a hypervisor-backed adapter (e.g. Firecracker, Cloud Hypervisor) for production use.
Trait Implementations§
Source§impl Clone for InMemoryVmProvider
impl Clone for InMemoryVmProvider
Source§fn clone(&self) -> InMemoryVmProvider
fn clone(&self) -> InMemoryVmProvider
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 InMemoryVmProvider
impl Debug for InMemoryVmProvider
Source§impl Default for InMemoryVmProvider
impl Default for InMemoryVmProvider
Source§fn default() -> InMemoryVmProvider
fn default() -> InMemoryVmProvider
Returns the “default value” for a type. Read more
Source§impl VmProvider for InMemoryVmProvider
impl VmProvider for InMemoryVmProvider
Source§fn create_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
fn create_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
Provision a new microVM with workspace defaults. Fails if
vm_id is already in use.Source§fn start_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
fn start_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
Start a created or stopped microVM. Fails if already running or destroyed.
Source§fn stop_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
fn stop_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
Stop a running microVM. Fails if not currently running.
Source§fn snapshot_vm(&self, vm_id: &str, snapshot_id: &str) -> VmRuntimeResult<()>
fn snapshot_vm(&self, vm_id: &str, snapshot_id: &str) -> VmRuntimeResult<()>
Capture the state of a microVM as a named snapshot.
Fails if the VM is destroyed or the snapshot name already exists.
Source§fn destroy_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
fn destroy_vm(&self, vm_id: &str) -> VmRuntimeResult<()>
Tear down a microVM. Terminal state — cannot be restarted.
Source§fn create_vm_with_spec(
&self,
vm_id: &str,
_spec: &VmSpec,
) -> VmRuntimeResult<()>
fn create_vm_with_spec( &self, vm_id: &str, _spec: &VmSpec, ) -> VmRuntimeResult<()>
Provision a new microVM with per-VM configuration overrides. Read more
Source§impl VmQuery for InMemoryVmProvider
impl VmQuery for InMemoryVmProvider
Source§fn list_vms(&self) -> VmRuntimeResult<Vec<VmView>>
fn list_vms(&self) -> VmRuntimeResult<Vec<VmView>>
Return all known VMs, sorted by identifier.
Source§fn get_vm(&self, vm_id: &str) -> VmRuntimeResult<Option<VmView>>
fn get_vm(&self, vm_id: &str) -> VmRuntimeResult<Option<VmView>>
Return a single VM by identifier, or
None if it does not exist.Source§fn list_snapshots(&self, vm_id: &str) -> VmRuntimeResult<Option<Vec<String>>>
fn list_snapshots(&self, vm_id: &str) -> VmRuntimeResult<Option<Vec<String>>>
Return the snapshot names for a VM, or
None if the VM does not exist.Auto Trait Implementations§
impl Freeze for InMemoryVmProvider
impl RefUnwindSafe for InMemoryVmProvider
impl Send for InMemoryVmProvider
impl Sync for InMemoryVmProvider
impl Unpin for InMemoryVmProvider
impl UnsafeUnpin for InMemoryVmProvider
impl UnwindSafe for InMemoryVmProvider
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