HypervisorProbe

Trait HypervisorProbe 

Source
pub trait HypervisorProbe:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &str;
    fn try_new_resource(&self) -> Result<Option<Resource<HypervisorKind>>>;
}
Expand description

Trait for probing hypervisor backend availability.

Each registered backend provides a probe that can check whether the backend is available and construct a resource for it.

Required Methods§

Source

fn name(&self) -> &str

Short name (e.g. “kvm”, “whp”). Matches the handle’s ResourceId::ID.

Source

fn try_new_resource(&self) -> Result<Option<Resource<HypervisorKind>>>

Checks whether this backend is available and, if so, returns a new [Resource<HypervisorKind>] for it.

Returns Ok(None) if the backend is not available on this system.

Implementors§