#[non_exhaustive]pub enum SessionErrorKind {
NotFound(SessionId),
AgentError,
Timeout(Duration),
SendWhileWaiting,
EventLoopClosed,
ElicitationNotSupported,
SessionFsProviderRequired,
InvalidSessionFsConfig,
SessionIdMismatch {
requested: SessionId,
returned: SessionId,
},
}Expand description
Session-scoped error kind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound(SessionId)
The CLI could not find the requested session.
AgentError
The CLI reported an error during agent execution (via session.error event).
Timeout(Duration)
A send_and_wait call exceeded its timeout.
SendWhileWaiting
send was called while a send_and_wait is in flight.
EventLoopClosed
The session event loop exited before a pending send_and_wait completed.
ElicitationNotSupported
Elicitation is not supported by the host.
Check session.capabilities().ui.elicitation before calling UI methods.
SessionFsProviderRequired
The client was started with crate::ClientOptions::session_fs but this
session was created without a crate::session_fs::SessionFsProvider. Set one via
crate::SessionConfig::with_session_fs_provider (or
crate::ResumeSessionConfig::with_session_fs_provider).
InvalidSessionFsConfig
crate::ClientOptions::session_fs was provided with empty or invalid
fields. All of initial_cwd and session_state_path must be non-empty.
SessionIdMismatch
The CLI returned a different session ID than the one the SDK registered.
Trait Implementations§
Source§impl Clone for SessionErrorKind
impl Clone for SessionErrorKind
Source§fn clone(&self) -> SessionErrorKind
fn clone(&self) -> SessionErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionErrorKind
impl Debug for SessionErrorKind
Source§impl Display for SessionErrorKind
impl Display for SessionErrorKind
impl Eq for SessionErrorKind
Source§impl From<SessionErrorKind> for Error
impl From<SessionErrorKind> for Error
Source§fn from(kind: SessionErrorKind) -> Self
fn from(kind: SessionErrorKind) -> Self
Source§impl PartialEq for SessionErrorKind
impl PartialEq for SessionErrorKind
Source§fn eq(&self, other: &SessionErrorKind) -> bool
fn eq(&self, other: &SessionErrorKind) -> bool
self and other values to be equal, and is used by ==.