pub enum ErrorKind {
Show 13 variants
Unexpected,
InvalidArg,
Retryable,
Credentials,
Protocol,
BuildWedged,
LaunchDied,
WindowClosed,
Platform,
Timeout,
Interrupted,
Precondition,
ExecFailed,
}Expand description
The coarse failure classes, one per non-zero row of the CLI’s exit table.
These categories are mapped to stable process exit codes by the CLI. The integer exit code lives in the CLI, not here: a library that owned process exit codes would be a library with an opinion about being a process.
Variants§
Unexpected
No handler claimed this — a bug in this crate, not the platform.
InvalidArg
Refused locally, before any AWS call. Every trap closure lands here.
Retryable
Transient. Run the identical request again.
Credentials
An identity is wrong or absent; waiting will not fix it.
Protocol
The daemon rejected the request on its merits.
BuildWedged
The image build was never scheduled — the clientToken replay signature.
LaunchDied
The MicroVM reached a terminal state before RUNNING; read stateReason.
WindowClosed
The MicroVM ended before the resume (the suspended window, the maximum duration, or a
terminate), and it can’t be resumed; launch a new one. The service refused the resume,
and GetMicrovm reports the VM TERMINATING or TERMINATED.
Platform
A control-plane failure with no more specific class.
Timeout
A client-side deadline elapsed. The VM and the exec are untouched.
Interrupted
Interrupted after launch; teardown ran and any leak is named in the payload.
Precondition
A prerequisite is missing.
ExecFailed
The sandbox worked and the command in it exited non-zero.
Its own class because it is the one failure that means nothing is wrong with the platform, the credentials, or this client — a CI caller needs to tell “your tests failed” from “we never got a VM”, and one shared class cannot say both.
Implementations§
Source§impl ErrorKind
impl ErrorKind
Sourcepub const ALL: [ErrorKind; 13]
pub const ALL: [ErrorKind; 13]
Every kind, in exit-code order.
Public so a binding can enumerate the catalog and a test can assert the mapping is total rather than sampling it.
Sourcepub fn retryable(self) -> bool
pub fn retryable(self) -> bool
Whether a failure of this kind could plausibly succeed on an identical retry.
The one answer Error::retryable reads, public so a binding that carries only
the code across its boundary (the TypeScript one) asks this rather than keeping a
list of retryable codes of its own.
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more