Expand description
Structured error types (thiserror) and sysexits-style exit codes.
Structured error types for ssh-cli.
Defines crate::errors::SshCliError with domain error categories used by the CLI.
Display strings are technical English (lowercase, no trailing period — G-ERR-01).
Localized UI copy belongs in i18n.
§Errors contract (G-ERR)
- Prefer typed variants over [
SshCliError::Generic]. - Preserve
std::error::Error::sourcevia helpers [SshCliError::tls_src] / [SshCliError::channel_src] instead of embedding{e}in a flat string. - Agents must read [
SshCliError::error_code] + [ErrorClass], not parse Display.
Modules§
- exit_
codes - Process exit codes aligned with sysexits.h and Unix signal conventions.
Enums§
- Error
Class - High-level error class for agent retry policy (Rules Rust — retry/backoff).
- Error
Layer - Stack layer where the failure was observed (diagnostic only).
- Retry
Kind - Detailed retry kind returned by
SshCliError::retry_kind. - SshCli
Error - Domain errors produced by ssh-cli operations.
Functions§
- anyhow_
is_ broken_ pipe - Walks
anyhow/ nested sources looking for a broken-pipe I/O error. - io_
error_ is_ transient_ network - Classifies
std::io::Errorkinds that are typically transient on the network path. - is_
broken_ pipe - Returns true when
erris a broken-pipe condition (EPIPE / SIGPIPE path).
Type Aliases§
- Error
Source - Shared source box for layered errors (Send + Sync for fan-out tasks).
- SshCli
Result - Result alias using
SshCliError.