#[non_exhaustive]pub enum Error {
Io(Error),
Serde(Error),
Transport(String),
StillRunning,
ShellExited,
SessionPoisoned,
PolicyDenied(String),
Unsupported(String),
Budget(String),
}Expand description
Errors returned by execkit.
#[non_exhaustive]: new variants may be added in a minor release without it
being a breaking change, so downstream match on Error must include a
wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Serde(Error)
Transport(String)
StillRunning
A command outlived its timeout and could not be interrupted (Ctrl-C and
a resync did not bring the shell back). The session is poisoned and
closed to further commands. (An interruptible timeout is not an error:
it returns Ok with ExecResult::timed_out set.)
ShellExited
The shell process exited and closed the session’s channel (for example the
command ran exit). Distinct from a timeout: it surfaces immediately. The
session is unusable; create a new one.
SessionPoisoned
The session is unusable: a prior command could not be interrupted after a timeout, or the shell exited. Create a new session.
PolicyDenied(String)
Blocked by the advisory policy before reaching the shell.
Unsupported(String)
The operation is not supported for this session (e.g. checkpoints on a local session, or git missing on the remote).
Budget(String)
An output budget was invalid (e.g. a malformed grep regex).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.