#[non_exhaustive]pub enum BobError {
Io {
context: &'static str,
source: Error,
},
PipeNotCaptured {
stream: &'static str,
},
Keychain(Error),
Serialize(Error),
Invalid(String),
NoDataDir,
Stream(StreamError),
}Expand description
Why a bob-rs operation (install, keychain I/O, spawn) failed.
Each variant carries the real underlying error as a source — an
std::io::Error, a keyring::Error, a serde_json::Error, or a
cli_stream::StreamError — rather than a pre-formatted string, so a
consumer can inspect or downcast it (e.g. branch on io::ErrorKind, or
recognise a keyring::Error::NoEntry). #[non_exhaustive] so adding a
variant later isn’t a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
An OS-level I/O failure while running the installer — spooling the
embedded script to a tempfile, setting its mode, spawning bash, or
waiting on it. context names the step; source is the OS error.
Fields
PipeNotCaptured
A spawned install child didn’t expose a piped stdout/stderr. Shouldn’t
happen given Stdio::piped(), but Child’s accessors return Option,
so the case is represented rather than unwrapped.
Keychain(Error)
The OS keychain rejected a read / write / delete of the API key.
Serialize(Error)
Serializing the on-disk auth-state marker failed.
Invalid(String)
A caller-supplied argument was invalid (e.g. an empty API key).
NoDataDir
The platform application-data directory couldn’t be resolved, so the auth-state marker has nowhere to live.
Stream(StreamError)
The subprocess engine failed to spawn or cancel bob.
Trait Implementations§
Source§impl Error for BobError
impl Error for BobError
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()