Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 40 variants Unsupported { what: String, }, Declined { what: String, }, Io { path: PathBuf, action: &'static str, source: Error, }, Locked { run: String, }, ToolMissing { step: String, tool: String, }, ToolTooOld { tool: String, found: String, required: String, }, ToolFailed { step: String, reason: String, }, ToolUnanswered { step: String, tool: String, reason: String, }, ToolDenied { step: String, tool: String, reason: String, }, CredentialsExpired { step: String, cloud: Option<Cloud>, reason: String, }, AddressPoolOverlap { step: String, reason: String, }, Timeout { step: String, timed_out: TimedOut, }, DownloadStalled { what: DownloadKind, step: String, after_s: u64, last_line: Option<String>, }, DownloadFailed { what: DownloadKind, step: String, reason: String, }, AlreadyRunning { run: String, }, RunningElsewhere { run: String, recorded: String, asked: String, }, PortInUse { port: HostPort, protocol: String, holder: Option<PortHolder>, }, NotParkable { run: String, mode: &'static str, }, NothingToResume { run: String, }, PartlyGone { run: String, machines: Vec<String>, }, NotRunning { run: String, }, NotReady { condition: String, detail: String, }, SecretMissing { name: String, }, Project { dir: PathBuf, reason: String, }, Input { name: String, reason: String, }, MachineUnknown { run: String, machine: String, }, MachineAmbiguous { run: String, which: &'static str, machines: String, }, NetworkUnknown { run: String, network: String, }, Elevation { reason: String, }, Provider { provider: String, reason: String, need: Option<ProviderNeed>, }, NoProvider { providers: String, }, Adopt { run: String, reason: String, }, RunName { value: String, }, NoConsole { machine: String, why: String, }, ServerAuthFailed { step: String, server: Option<String>, reason: String, }, Corrupt { path: PathBuf, what: &'static str, source: Error, }, Store { action: &'static str, code: ErrorCode, reason: String, }, IllegalTransition(IllegalTransition), StateConflict { run: String, expected: RunState, found: Option<RunState>, }, LeaseHeld { scope: String, pid: u32, },
}
Expand description

Why an operation of the runner failed.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Unsupported

The manifest needs something this runner doesn’t do, or the call asks the run for something its target can’t do.

Fields

§what: String

What, in a few words: target cloud-vm on this host; step up: the action ssh.run on a compose run.

§

Declined

The run’s format doesn’t do the operation asked (Terraform parks, resumes and provisions nothing; Compose provisions nothing): refused before anything acts on the run. Its code is unsupported.

Fields

§what: String

What, in a few words: parking on a Terraform run: ….

§

Io

A file or folder couldn’t be read or written, or a loopback port bound.

Fields

§path: PathBuf

The file or folder (or the port: a tcp port on 127.0.0.1).

§action: &'static str

What was done to it (read, written, created, locked, bound).

§source: Error

The OS’s reason.

§

Locked

Another process holds the run’s lock.

Fields

§run: String

The run.

§

ToolMissing

A step’s tool isn’t on PATH.

Fields

§step: String

The step.

§tool: String

The tool.

§

ToolTooOld

A tool answers at a version older than the manifest’s min_version for it.

Fields

§tool: String

The tool.

§found: String

The version it answered with.

§required: String

The oldest version the run takes.

§

ToolFailed

A step’s tool ran and failed.

Fields

§step: String

The step.

§reason: String

Its last error lines, or its exit status (secrets masked).

§

ToolUnanswered

A tool the run needs is installed, but its service didn’t answer: a container engine stopped, or quit while a step ran. Said by its code, so a caller never reads it out of a Error::ToolFailed’s wording.

Fields

§step: String

The probing step (tools).

§tool: String

The tool, by its manifest name (docker).

§reason: String

What it said, or why its answer is none (secrets masked).

§

ToolDenied

A tool refused this account: Docker’s engine its socket or named pipe.

Fields

§step: String

The step.

§tool: String

The tool (docker).

§reason: String

What it said (secrets masked).

§

CredentialsExpired

A cloud refused the sign-in the run’s tools use: it ran out, or was never made.

Fields

§step: String

The step.

§cloud: Option<Cloud>

The cloud, when the failure names its Terraform provider.

§reason: String

What the tool said (secrets masked).

§

AddressPoolOverlap

A network the run makes needs an address block another network holds.

Fields

§step: String

The step.

§reason: String

What the tool said (secrets masked).

§

Timeout

A step ran out of time: it showed no progress for its limit, or it ran to the ceiling.

Fields

§step: String

The step.

§timed_out: TimedOut

Which limit it ran into.

§

DownloadStalled

A download (what a step downloads in its own phase before it runs, or a step the manifest marks a download) showed no progress for after_s seconds, and was stopped. A download has no other limit: one still moving runs as long as it moves.

Fields

§what: DownloadKind

What it downloads.

§step: String

The download’s step (pull-up or boxes-up, before the up it downloads for; a manifest’s own, pull-start).

§after_s: u64

How long it went without progress, in seconds.

§last_line: Option<String>

The last line it printed (secrets masked, cut to 300 bytes); none when it printed nothing.

§

DownloadFailed

A download couldn’t be made.

Fields

§what: DownloadKind

What it downloads.

§step: String

The download’s step (pull-up, boxes-up, pull-start).

§reason: String

The last try’s last error lines, or its exit status (secrets masked).

§

AlreadyRunning

The run is already up.

Fields

§run: String

The run.

§

RunningElsewhere

The run is recorded somewhere else.

Fields

§run: String

The run.

§recorded: String

Where its record says it is.

§asked: String

Where this operation was asked to run.

§

PortInUse

A host port the run publishes is taken.

Fields

§port: HostPort

The port, on the host.

§protocol: String

tcp or udp.

§holder: Option<PortHolder>

The process listening on it, when the runner found it (looked up once the operation failed, best-effort).

§

NotParkable

No park steps for that mode.

Fields

§run: String

The run.

§mode: &'static str

The mode asked for.

§

NothingToResume

Nothing left to resume.

Fields

§run: String

The run.

§

PartlyGone

Some of the run’s machines are gone (removed outside the runner): a resume brings back only what was kept, so it can’t bring the run back as it was.

Fields

§run: String

The run.

§machines: Vec<String>

Its machines that are gone.

§

NotRunning

The run isn’t up.

Fields

§run: String

The run.

§

NotReady

A ready condition didn’t hold.

Fields

§condition: String

The condition (step_ok up, tcp 127.0.0.1:8080).

§detail: String

Why.

§

SecretMissing

A required secret or input has no value.

Fields

§name: String

The slot.

§

Project

A folder that isn’t a project Isothrum runs.

Fields

§dir: PathBuf

The folder.

§reason: String

Why, with the fix.

§

Input

A value or secret that can’t be handed to the tools (its name empty or holding =, a NUL in it).

Fields

§name: String

Its name.

§reason: String

Why.

§

MachineUnknown

A machine the run doesn’t have (to provision, console into, attach, detach or retire).

Fields

§run: String

The run.

§machine: String

The machine asked for.

§

MachineAmbiguous

The run has several machines the call could mean, and it named none.

Fields

§run: String

The run.

§which: &'static str

Which machines the call could mean (on-demand machines).

§machines: String

Their names, comma-separated.

§

NetworkUnknown

A network the run doesn’t have.

Fields

§run: String

The run.

§network: String

The network asked for.

§

Elevation

The elevation the run’s commands need couldn’t be had.

Fields

§reason: String

Why (the permission prompt declined, the elevated session ended).

§

Provider

The run’s Vagrant provider can’t run it.

Fields

§provider: String

The provider asked for.

§reason: String

Why it can’t run the run, and what to do.

§need: Option<ProviderNeed>

What this computer lacks for it, when that is what refused it.

§

NoProvider

A Vagrant run was asked for with no provider.

Fields

§providers: String

The run’s providers, as the manifest names them (`virtualbox`, `libvirt`).

§

Adopt

A deployment that can’t be taken over as a run.

Fields

§run: String

The run it would have become.

§reason: String

Why.

§

RunName

A run name that can’t name a run.

Fields

§value: String

The name as given.

§

NoConsole

A machine with no graphical console to reach, and why.

Fields

§machine: String

The machine.

§why: String

Why.

§

ServerAuthFailed

The server the run is on refused the run’s credentials (a 401 or 403 from its API, its tool’s failed sign-in): an API token revoked, a password changed.

Fields

§step: String

The step (up; status for a status read).

§server: Option<String>

The server, as the run’s params name it (its API’s host, the ESXi host), when they do.

§reason: String

What the server or its tool said (secrets masked).

§

Corrupt

A file of the runner’s own is there but isn’t what it wrote (not JSON, or another version’s shape): told apart from a file that can’t be read, which is the OS’s to explain.

Fields

§path: PathBuf

The file.

§what: &'static str

What it should hold (record, ledger entry).

§source: Error

Why it doesn’t parse.

§

Store

The home’s store couldn’t do what was asked.

Fields

§action: &'static str

What (opened, read, written, migrated).

§code: ErrorCode

The failure’s code (locked, store_corrupt, store_version, io).

§reason: String

SQLite’s word, or the store’s.

§

IllegalTransition(IllegalTransition)

The run’s state machine refused the move.

§

StateConflict

The run moved between the read and the write that would have moved it.

Fields

§run: String

The run.

§expected: RunState

Where the move started.

§found: Option<RunState>

Where the run stood instead.

§

LeaseHeld

A live process holds the lease asked for.

Fields

§scope: String

The lease.

§pid: u32

Its holder’s process id.

Implementations§

Source§

impl Error

Source

pub fn detail(&self) -> Option<ErrorDetail>

The failure’s typed fields, for one that has any beyond its code and message.

Source§

impl Error

Source

pub fn report(&self) -> ErrorReport

The failure as an embedder reads it: Error::code, its message, its step, Error::detail, and whether the run may have changed.

Source§

impl Error

Source

pub fn code(&self) -> ErrorCode

The failure’s stable code.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<IllegalTransition> for Error

Source§

fn from(source: IllegalTransition) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Forget for Error

§

impl Freeze for Error
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, &'static str: Freeze, *const () is !null: Freeze, PhantomData<ErrorData<CustomOwner>>: Freeze, PhantomData<String>: Freeze, *const ErrorImpl is !null: Freeze, PhantomData<ErrorImpl>: Freeze,

§

impl Move for Error

§

impl Send for Error
where RawVecInner: Send, &'static str: Send, Repr: Send, BoxRaw<ErrorImpl>: Send,

§

impl Sync for Error
where RawVecInner: Sync, Repr: Sync, BoxRaw<ErrorImpl>: Sync,

§

impl Unpin for Error
where *const u8 is !null: Unpin, &'static str: Unpin, *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin, Box<ErrorImpl>: Unpin,

§

impl UnsafeUnpin for Error
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, &'static str: UnsafeUnpin, *const () is !null: UnsafeUnpin, PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, *const ErrorImpl is !null: UnsafeUnpin, PhantomData<ErrorImpl>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more