#[non_exhaustive]pub enum ErrorKind {
Show 14 variants
Usage,
InvalidInput,
NotFound,
RateLimited,
Unavailable,
Timeout,
Network,
Budget,
Parse,
Config,
Internal,
Interrupted,
Terminated,
BrokenPipe,
}Expand description
Canonical error kinds exposed in JSON envelopes.
Marked #[non_exhaustive] so new kinds can ship without a SemVer major break
for external match consumers of this library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Usage
Clap usage / argv error (exit 64).
InvalidInput
Invalid domain input such as crate name or path (exit 65).
NotFound
Remote resource missing (exit 66).
RateLimited
HTTP 429 rate limit (exit 69, retryable).
Remote 5xx or temporary outage (exit 69, retryable).
Timeout
Wall-clock deadline exceeded (exit 124, retryable).
Network
Transport / unexpected HTTP failure (exit 74, retryable).
Budget
Local body/output budget exceeded (exit 74, not retryable).
Permanent for the same config: raising --max-body-bytes (or lowering
the remote payload) is required — agents must not auto-retry.
Parse
Body parse failure (exit 65).
Config
Local configuration error (exit 78).
Internal
Unexpected internal failure (exit 70).
Interrupted
SIGINT / Ctrl-C
Terminated
SIGTERM graceful cancel
BrokenPipe
stdout write hit a closed pipe (EPIPE / SIGPIPE)
Implementations§
Source§impl ErrorKind
impl ErrorKind
Sourcepub fn is_retryable(self) -> bool
pub fn is_retryable(self) -> bool
Alias of Self::retryable (Rules Rust checklist name is_retryable).
Sourcepub fn is_permanent(self) -> bool
pub fn is_permanent(self) -> bool
Permanent for agent auto-retry (complement of Self::is_retryable).
Cancel / broken-pipe kinds are permanent: do not re-issue the same command as if the remote failed.
Sourcepub fn retry_kind(self) -> RetryKind
pub fn retry_kind(self) -> RetryKind
Detailed retry category (Rules Rust checklist retry_kind).
Trait Implementations§
impl Copy for ErrorKind
Source§impl<'de> Deserialize<'de> for ErrorKind
impl<'de> Deserialize<'de> for ErrorKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.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>
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>
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