#[non_exhaustive]pub enum SessionError {
Io(Error),
Json(Error),
ProcessExited {
code: Option<i32>,
stderr: String,
},
Closed,
ControlError {
subtype: String,
error: String,
},
ControlTimeout(String),
CodeMode(CodeModeError),
UnsupportedCliVersion {
found: String,
min: &'static str,
},
InvalidRecording(String),
}Expand description
Error of a session operation.
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.
Io(Error)
An I/O error, e.g. spawning the CLI or opening a recording file.
Json(Error)
A frame could not be serialized or parsed.
ProcessExited
The CLI process exited.
Fields
Closed
The session was closed, or stdin is gone.
ControlError
The CLI answered a control request with an error.
ControlTimeout(String)
No answer to the control request (named by its subtype) in time
(SessionOptions::control_timeout for requests after initialize).
CodeMode(CodeModeError)
Building the Code Mode binary failed.
UnsupportedCliVersion
The CLI is older than MIN_CLI_VERSION.
InvalidRecording(String)
A recording passed to replay that cannot be replayed.
Trait Implementations§
Source§impl Debug for SessionError
impl Debug for SessionError
Source§impl Display for SessionError
impl Display for SessionError
Source§impl Error for SessionError
impl Error for SessionError
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<CodeModeError> for SessionError
impl From<CodeModeError> for SessionError
Source§fn from(source: CodeModeError) -> Self
fn from(source: CodeModeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for SessionError
impl From<Error> for SessionError
Source§impl From<Error> for SessionError
impl From<Error> for SessionError
Source§impl From<SessionError> for AgentError
impl From<SessionError> for AgentError
Source§fn from(source: SessionError) -> Self
fn from(source: SessionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SessionError
impl !UnwindSafe for SessionError
impl Forget for SessionError
impl Freeze for SessionError
impl Move for SessionError
impl Send for SessionError
impl Sync for SessionError
impl Unpin for SessionError
impl UnsafeUnpin for SessionError
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