pub enum BondError {
Io(Error),
Sqlite(Error),
Serde(Error),
AlreadyExists,
TargetExists(String),
NotFound(String),
InvalidPath(String),
Config(String),
AmbiguousId(String),
InvalidTimestamp(String),
}Expand description
Errors surfaced by the API
This is the main error type returned by all public methods in this crate. It wraps various underlying error types (IO, SQLite, serialization) as well as domain-specific errors like NotFound or AlreadyExists. The kind() method allows callers to categorize errors for consistent CLI rendering.
Variants§
Io(Error)
Filesystem or OS I/O failure.
Sqlite(Error)
SQLite query/connection failure.
Serde(Error)
JSON serialization/deserialization failure.
AlreadyExists
A conflicting bond record already exists.
TargetExists(String)
The requested target path already exists and cannot be replaced.
NotFound(String)
No bond matched the provided identifier.
InvalidPath(String)
A provided path is invalid or unusable.
Config(String)
Configuration file parse or write error.
AmbiguousId(String)
The identifier prefix matched more than one bond.
InvalidTimestamp(String)
Failed to parse or interpret a timestamp.
Implementations§
Trait Implementations§
Source§impl Error for BondError
impl Error for BondError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()