#[non_exhaustive]pub enum TerminalError {
TaskLost,
InvalidTarget(String),
UnknownLocation(String),
NoRemoteSandbox(String),
SshPrepare(SshPrepareError),
Denied(String),
NoApprover(ApprovalKind),
Approval(ApprovalError),
SandboxSetup(String),
Execution(String),
Io(Error),
}Expand description
Errors that can occur during terminal execution.
The variants carry the facts; the Display texts are for logs and
diagnostics, and the model never reads them: it reads what
ShellWording::run_failure makes of the error. The String of
Execution and SandboxSetup is
the detail the failing backend reported, not a sentence of the shell’s.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TaskLost
The task that runs the script ended before it registered or answered.
InvalidTarget(String)
Execution environment or mode is not configured.
UnknownLocation(String)
location names no configured SSH server.
NoRemoteSandbox(String)
A default-mode command names a server that has no heel to sandbox it.
SshPrepare(SshPrepareError)
The server’s preparation failed; the next command naming it prepares it again.
Denied(String)
The approver denied the script; the model reads the reason it gave.
NoApprover(ApprovalKind)
The script needs approval, and neither its call nor the terminal has an approver to give it.
Approval(ApprovalError)
Asking for approval failed or was cancelled.
SandboxSetup(String)
Sandbox setup failed.
Execution(String)
Script execution failed.
Io(Error)
IO error.
Implementations§
Trait Implementations§
Source§impl Debug for TerminalError
impl Debug for TerminalError
Source§impl Display for TerminalError
impl Display for TerminalError
Source§impl Error for TerminalError
impl Error for TerminalError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ApprovalError> for TerminalError
impl From<ApprovalError> for TerminalError
Source§fn from(source: ApprovalError) -> Self
fn from(source: ApprovalError) -> Self
Source§impl From<Error> for TerminalError
impl From<Error> for TerminalError
Source§impl From<SpawnError> for TerminalError
impl From<SpawnError> for TerminalError
Source§fn from(error: SpawnError) -> Self
fn from(error: SpawnError) -> Self
Source§impl From<SshPrepareError> for TerminalError
impl From<SshPrepareError> for TerminalError
Source§fn from(source: SshPrepareError) -> Self
fn from(source: SshPrepareError) -> Self
Source§impl From<TerminalError> for ShellRunError
impl From<TerminalError> for ShellRunError
Source§fn from(source: TerminalError) -> Self
fn from(source: TerminalError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for TerminalError
impl !UnwindSafe for TerminalError
impl Forget for TerminalError
impl Freeze for TerminalError
impl Move for TerminalError
impl Send for TerminalError
impl Sync for TerminalError
impl Unpin for TerminalError
impl UnsafeUnpin for TerminalError
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
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> ⓘ
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