#[non_exhaustive]pub enum ErrorKind {
Show 15 variants
Usage,
InvalidInput,
NotFound,
RateLimited,
Unavailable,
Timeout,
Network,
Budget,
Parse,
Config,
Io,
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).
Io
Local filesystem failure caused by the environment (exit 74).
A full disk, a read-only mount or a directory the process cannot enter
are facts about the machine, not defects in this binary. They used to
arrive as Self::Internal, which tells an agent to report a bug in a
CLI that behaved correctly, and as retryable: false, which is wrong the
moment the operator frees a block. Retryability here comes from the OS
cause carried in the detail, so read AppError::retryable rather than
Self::retryable, which can only answer for the kind.
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 retryable(self) -> bool
pub fn retryable(self) -> bool
Whether an agent may retry the same invocation after backoff.
Self::Io answers false here and means “unknown, ask the detail”:
the kind alone cannot tell a full disk from a permission denial. The wire
field comes from AppError::retryable, which reads the cause, so this
conservative answer never reaches an envelope.
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.