#[non_exhaustive]pub enum ShellRunError {
Timeout {
cap: Duration,
},
Refused(ScriptRefusal),
NoWorkspaceMount,
OutsideWorkspace(MountRootError),
Terminal(TerminalError),
Ids(IdsExhausted),
}Expand description
Why a Shell::run did not run to an end.
The variants carry the facts; the Display texts are for logs and
diagnostics, and the model never reads them: the tool boundary words a
failure through ShellWording::run_failure and
ShellWording::call_refused.
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.
Timeout
The timeout is zero or above the terminal’s cap.
Refused(ScriptRefusal)
A command policy refused the script.
NoWorkspaceMount
The terminal runs in a container that declares no workspace mount, so no host directory maps into it.
OutsideWorkspace(MountRootError)
The working directory lies outside the container’s workspace mount.
Terminal(TerminalError)
The terminal could not run the script: no backend for its mode, a refused permission or a failed execution.
Ids(IdsExhausted)
Every model-facing id is leased, so the command has no task id.
Trait Implementations§
Source§impl Debug for ShellRunError
impl Debug for ShellRunError
Source§impl Display for ShellRunError
impl Display for ShellRunError
Source§impl Error for ShellRunError
impl Error for ShellRunError
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<IdsExhausted> for ShellRunError
impl From<IdsExhausted> for ShellRunError
Source§fn from(source: IdsExhausted) -> Self
fn from(source: IdsExhausted) -> Self
Converts to this type from the input type.
Source§impl From<MountRootError> for ShellRunError
impl From<MountRootError> for ShellRunError
Source§fn from(source: MountRootError) -> Self
fn from(source: MountRootError) -> Self
Converts to this type from the input type.
Source§impl From<TerminalError> for ShellRunError
impl From<TerminalError> for ShellRunError
Source§fn from(source: TerminalError) -> Self
fn from(source: TerminalError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ShellRunError
impl !UnwindSafe for ShellRunError
impl Forget for ShellRunError
impl Freeze for ShellRunError
impl Move for ShellRunError
impl Send for ShellRunError
impl Sync for ShellRunError
impl Unpin for ShellRunError
impl UnsafeUnpin for ShellRunError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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