#[non_exhaustive]pub enum AgentError {
InvalidCwd(PathBuf),
McpStartup {
server: String,
source: BoxError,
},
DuplicateSessionId(SessionId),
Observer(BoxError),
SessionNotFound(SessionId),
ModeNotFound(String),
Restore(BoxError),
Init(SessionInitError),
Other(BoxError),
}Expand description
Process-level agent error.
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.
InvalidCwd(PathBuf)
McpStartup
MCP server failed to start (stdio process could not be launched / SSE connection could not be established).
DuplicateSessionId(SessionId)
The caller-provided SessionId already exists in the session table.
A monotonic + timestamp ID generator should theoretically never collide; this is a
safety net.
Observer(BoxError)
SessionNotFound(SessionId)
ModeNotFound(String)
The mode_id received by set_mode is not in the session’s mode directory (or
the directory is not mounted).
Restore(BoxError)
Init(SessionInitError)
Session capability adjudication failed during startup. See SessionInitError.
Other(BoxError)
Trait Implementations§
Source§impl Debug for AgentError
impl Debug for AgentError
Source§impl Display for AgentError
impl Display for AgentError
Source§impl Error for AgentError
impl Error for AgentError
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<BoxError> for AgentError
impl From<BoxError> for AgentError
Source§impl From<SessionInitError> for AgentError
impl From<SessionInitError> for AgentError
Source§fn from(source: SessionInitError) -> Self
fn from(source: SessionInitError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for AgentError
impl !UnwindSafe for AgentError
impl Freeze for AgentError
impl Send for AgentError
impl Sync for AgentError
impl Unpin for AgentError
impl UnsafeUnpin for AgentError
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