pub enum ClaudeCodeError {
Io(Error),
WebSocket(Box<Error>),
Json(Error),
Random(String),
}Expand description
Errors raised while serving an agent connection or managing the server.
Variants§
Io(Error)
Socket / lockfile I/O failure.
WebSocket(Box<Error>)
WebSocket transport / handshake failure (including auth rejection
surfaced by the handshake). Boxed because tungstenite::Error is a
~136-byte enum; boxing keeps ClaudeCodeError small so every
Result<_, ClaudeCodeError> stays cheap to move (clippy
result_large_err). The manual From below preserves ?
ergonomics on a bare tungstenite::Error.
Json(Error)
JSON (de)serialization failure on the wire.
Random(String)
The OS random source was unavailable when minting an auth token.
Trait Implementations§
Source§impl Debug for ClaudeCodeError
impl Debug for ClaudeCodeError
Source§impl Display for ClaudeCodeError
impl Display for ClaudeCodeError
Source§impl Error for ClaudeCodeError
impl Error for ClaudeCodeError
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<Error> for ClaudeCodeError
impl From<Error> for ClaudeCodeError
Source§impl From<Error> for ClaudeCodeError
impl From<Error> for ClaudeCodeError
Auto Trait Implementations§
impl !RefUnwindSafe for ClaudeCodeError
impl !UnwindSafe for ClaudeCodeError
impl Freeze for ClaudeCodeError
impl Send for ClaudeCodeError
impl Sync for ClaudeCodeError
impl Unpin for ClaudeCodeError
impl UnsafeUnpin for ClaudeCodeError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.