Skip to main content

ExecError

Enum ExecError 

Source
pub enum ExecError {
    Unreachable {
        environment: String,
        detail: String,
    },
    Timeout {
        id: String,
        millis: u64,
    },
    Exhausted {
        id: String,
        budget: u64,
    },
    Failed {
        id: String,
        message: String,
    },
    Protocol {
        id: String,
        detail: String,
    },
    NotRegistered(String),
    Unbound(String),
    NoSuchField {
        value: String,
        field: String,
    },
    Untyped(String),
    UnknownSignature(QualifiedName),
    TooDeep,
    Overflow {
        op: String,
    },
}
Expand description

Why an implementation did not produce an answer.

The distinction that matters here is between a proof being wrong and a proof being unreachable. An implementation that returns the wrong shape has failed to prove what it claimed, and trying a different one would be papering over that. An implementation that could not be started because the interpreter is not installed has not failed at all, and the dispatcher is free to look elsewhere.

Variants§

§

Unreachable

The environment could not be reached at all.

Fields

§environment: String

Where the implementation was to run.

§detail: String

What went wrong.

§

Timeout

The implementation did not answer in time.

Fields

§id: String

The implementation that hung.

§millis: u64

How long it was given.

§

Exhausted

The implementation used up the work it was allowed.

The sandbox working rather than the proof being wrong: a guest with no process to kill is stopped this way instead.

Fields

§id: String

The implementation that would not stop.

§budget: u64

How much work it was allowed.

§

Failed

The implementation reported a failure of its own.

Fields

§id: String

The implementation that failed.

§message: String

What it said.

§

Protocol

The two sides did not agree on how to talk.

Fields

§id: String

The implementation involved.

§detail: String

What was wrong with what it sent.

§

NotRegistered(String)

An implementation was registered without a body to run.

§

Unbound(String)

A body used a name nothing bound.

§

NoSuchField

A body read a field off something that has none.

Fields

§value: String

What was being read.

§field: String

The field asked for.

§

Untyped(String)

A body did something its types said it would not.

The checker rules these out ahead of time, so reaching one means a body ran without being checked.

§

UnknownSignature(QualifiedName)

A body called a signature that is not in the workspace.

§

TooDeep

Following calls between bodies went too deep.

§

Overflow

Arithmetic produced a number the wire cannot carry.

A failure of the body, not of anywhere it ran: every proof given the same numbers would overflow the same way.

Fields

§op: String

The operation.

Implementations§

Source§

impl ExecError

Source

pub fn is_environmental(&self) -> bool

Whether this says something about the environment rather than about the proof.

Only these are worth retrying somewhere else. A proof that returned the wrong thing will return the wrong thing again.

Trait Implementations§

Source§

impl Debug for ExecError

Source§

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

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

impl Display for ExecError

Source§

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

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

impl Error for ExecError

1.30.0 · 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

Auto Trait Implementations§

§

impl Forget for ExecError

§

impl Freeze for ExecError
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for ExecError

§

impl RefUnwindSafe for ExecError

§

impl Send for ExecError
where RawVecInner: Send,

§

impl Sync for ExecError
where RawVecInner: Sync,

§

impl Unpin for ExecError
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for ExecError

§

impl UnwindSafe for ExecError
where RawVecInner: UnwindSafe,

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, 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> 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.