pub enum InteractiveError {
Show 20 variants
CommandDiscovery(String),
CommandNotFound(String),
Session(String),
SessionNotFound(String),
Execution(String),
ParallelExecution(String),
CostTracking(String),
History(String),
OutputFormatting(String),
Configuration(String),
PermissionDenied(String),
InvalidInput(String),
Timeout(u64),
Io(Error),
Serialization(Error),
ClaudeSDK(Error),
Uuid(Error),
FileWatcher(Error),
AsyncTask(JoinError),
Utf8Conversion(FromUtf8Error),
}
Expand description
Comprehensive error type for the claude-sdk-rs CLI
Variants§
CommandDiscovery(String)
CommandNotFound(String)
Session(String)
SessionNotFound(String)
Execution(String)
ParallelExecution(String)
CostTracking(String)
History(String)
OutputFormatting(String)
Configuration(String)
PermissionDenied(String)
InvalidInput(String)
Timeout(u64)
Io(Error)
Serialization(Error)
ClaudeSDK(Error)
Uuid(Error)
FileWatcher(Error)
AsyncTask(JoinError)
Utf8Conversion(FromUtf8Error)
Implementations§
Source§impl InteractiveError
impl InteractiveError
Sourcepub fn command_discovery<S: Into<String>>(msg: S) -> Self
pub fn command_discovery<S: Into<String>>(msg: S) -> Self
Create a command discovery error
Sourcepub fn cost_tracking<S: Into<String>>(msg: S) -> Self
pub fn cost_tracking<S: Into<String>>(msg: S) -> Self
Create a cost tracking error
Sourcepub fn invalid_input<S: Into<String>>(msg: S) -> Self
pub fn invalid_input<S: Into<String>>(msg: S) -> Self
Create an invalid input error
Sourcepub fn session_not_found<S: Into<String>>(id: S) -> Self
pub fn session_not_found<S: Into<String>>(id: S) -> Self
Create a session not found error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error should be retried
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
Get user-friendly error message with suggestions
Trait Implementations§
Source§impl Debug for InteractiveError
impl Debug for InteractiveError
Source§impl Display for InteractiveError
impl Display for InteractiveError
Source§impl Error for InteractiveError
impl Error for InteractiveError
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 InteractiveError
impl From<Error> for InteractiveError
Source§impl From<Error> for InteractiveError
impl From<Error> for InteractiveError
Source§impl From<Error> for InteractiveError
impl From<Error> for InteractiveError
Source§impl From<Error> for InteractiveError
impl From<Error> for InteractiveError
Source§impl From<Error> for InteractiveError
impl From<Error> for InteractiveError
Source§impl From<FromUtf8Error> for InteractiveError
impl From<FromUtf8Error> for InteractiveError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<InteractiveError> for Error
impl From<InteractiveError> for Error
Source§fn from(err: InteractiveError) -> Self
fn from(err: InteractiveError) -> Self
Converts to this type from the input type.
Source§impl From<JoinError> for InteractiveError
impl From<JoinError> for InteractiveError
Source§impl UserFriendlyError for InteractiveError
impl UserFriendlyError for InteractiveError
fn user_message(&self) -> String
Auto Trait Implementations§
impl Freeze for InteractiveError
impl !RefUnwindSafe for InteractiveError
impl Send for InteractiveError
impl Sync for InteractiveError
impl Unpin for InteractiveError
impl !UnwindSafe for InteractiveError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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