#[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 ==.impl StructuralPartialEq for SessionErrorKind
Auto Trait Implementations§
impl Freeze for SessionErrorKind
impl RefUnwindSafe for SessionErrorKind
impl Send for SessionErrorKind
impl Sync for SessionErrorKind
impl Unpin for SessionErrorKind
impl UnsafeUnpin for SessionErrorKind
impl UnwindSafe for SessionErrorKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.