Skip to main content

ToolError

Enum ToolError 

Source
pub enum ToolError {
    InvalidInvocation(InvalidInvocation),
    Io(Error),
    NotExecutable,
    Artifact(ArtifactError),
    Execution(Box<ExecutionError>),
    VersionUtf8 {
        source: Utf8Error,
        evidence: Box<ExecutionEvidence>,
    },
    VersionMismatch {
        evidence: Box<ExecutionEvidence>,
    },
}
Expand description

Executable admission or execution failed.

Variants§

§

InvalidInvocation(InvalidInvocation)

Invalid context, authority or arguments; no child was spawned.

§

Io(Error)

Filesystem path resolution or metadata failed before execution.

§

NotExecutable

The selected file has no Unix executable permission bits.

§

Artifact(ArtifactError)

Executable identity could not be read or did not match authority.

§

Execution(Box<ExecutionError>)

One invocation failed; includes bounded evidence.

§

VersionUtf8

Successful version stdout was not valid UTF-8.

Fields

§source: Utf8Error

UTF-8 validation failure.

§evidence: Box<ExecutionEvidence>

Raw bounded version output.

§

VersionMismatch

Successful trimmed version stdout did not match the selected identity.

Fields

§evidence: Box<ExecutionEvidence>

Raw bounded version output; never formatted into the error.

Implementations§

Source§

impl ToolError

Source

pub fn evidence(&self) -> Option<&ExecutionEvidence>

Borrow the original bounded capture, including successful version output.

Validation and filesystem/admission failures have no capture and return None. A failed spawn retains its existing empty execution evidence. No output is copied, decoded, logged or formatted by this accessor.

Source

pub fn execution_error(&self) -> Option<&ExecutionError>

Borrow the original execution failure and its kill/reap outcomes, if any.

A successful version capture rejected by admission has evidence but no execution failure. Formatting, redaction and recovery remain caller-owned.

Trait Implementations§

Source§

impl Debug for ToolError

Source§

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

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

impl Display for ToolError

Source§

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

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

impl Error for ToolError

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

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§

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