pub enum MicrovmError {
UnsupportedPlatform,
InvalidConfig(String),
Lifecycle(LifecycleError),
Backend(String),
GuestFile {
kind: GuestFileErrorKind,
path: String,
},
HttpProxy(HttpProxyError),
SnapshotFormat(String),
Io(Error),
}Expand description
Top-level error type returned by the microVM crate.
Errors are intentionally grouped by configuration, lifecycle, backend, guest file protocol, HTTP proxy, snapshot, and host I/O boundaries.
Variants§
UnsupportedPlatform
KVM microVMs are not supported on the current platform or build configuration.
InvalidConfig(String)
microVM configuration is invalid.
Lifecycle(LifecycleError)
Current lifecycle state does not allow the requested operation.
Tuple Fields
§
0: LifecycleErrorSource lifecycle-state error.
Backend(String)
KVM or guest protocol error.
GuestFile
Guest-side file operation error.
Fields
§
kind: GuestFileErrorKindSemantic category reported by the guest file protocol.
HttpProxy(HttpProxyError)
Controlled HTTP proxy error.
Tuple Fields
§
0: HttpProxyErrorSource HTTP proxy error.
SnapshotFormat(String)
Snapshot format is invalid or incompatible.
Io(Error)
Standard library I/O error.
Trait Implementations§
Source§impl Debug for MicrovmError
impl Debug for MicrovmError
Source§impl Display for MicrovmError
impl Display for MicrovmError
Source§impl Error for MicrovmError
impl Error for MicrovmError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for MicrovmError
impl From<Error> for MicrovmError
Source§impl From<HttpProxyError> for MicrovmError
impl From<HttpProxyError> for MicrovmError
Source§fn from(source: HttpProxyError) -> Self
fn from(source: HttpProxyError) -> Self
Converts to this type from the input type.
Source§impl From<MicrovmError> for PoolError
impl From<MicrovmError> for PoolError
Source§fn from(source: MicrovmError) -> Self
fn from(source: MicrovmError) -> Self
Converts to this type from the input type.
Source§impl From<MicrovmError> for RestorePoolError
Available on Linux and crate feature kvm only.
impl From<MicrovmError> for RestorePoolError
Available on Linux and crate feature
kvm only.Source§fn from(source: MicrovmError) -> Self
fn from(source: MicrovmError) -> Self
Converts to this type from the input type.
Source§impl From<MicrovmError> for SandboxError
impl From<MicrovmError> for SandboxError
Source§fn from(value: MicrovmError) -> Self
fn from(value: MicrovmError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MicrovmError
impl !RefUnwindSafe for MicrovmError
impl Send for MicrovmError
impl Sync for MicrovmError
impl Unpin for MicrovmError
impl UnsafeUnpin for MicrovmError
impl !UnwindSafe for MicrovmError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.