pub fn engine_for(_h: &Hypervisor) -> Result<Infallible, EngineSelectError>Expand description
Fallback when no engine backend is compiled in (default build / non-macOS).
The success type is std::convert::Infallible rather than
Box<dyn MaquinaEngine>, and that is the honest signature: without the
engines feature the maquina-engine crate is not linked at all, so there
is no engine type to name — and no engine can ever be produced. An
uninhabited Ok says exactly that at the type level instead of promising a
value this build can never construct.
The previous signature named MaquinaEngine unconditionally, which is what
forced the ungated use above and broke the default build.
§Errors
Always EngineSelectError::Unavailable.