#[non_exhaustive]pub enum SecretError {
Io(Error),
Decode(Error),
InvalidKey(String),
InvalidEnvironment(String),
ValueTooLong {
key: String,
len: usize,
},
FutureVersion(u32),
}Expand description
Error type returned by this module.
#[non_exhaustive]: shep-core is published, so a new failure variant
must not break an out-of-tree match.
Wraps io::Error/serde_json::Error directly rather than stringifying
them, matching crate::kv::KvError, so callers keep the underlying
diagnostic through core::error::Error::source; this type does not
derive Clone/PartialEq/Eq as a result.
No variant carries a secret’s value: a message names the key, the namespace or the environment, and nothing else.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
The store could not be read, written, or replaced.
Decode(Error)
The store’s JSON could not be parsed.
Refused rather than repaired: a partial read would silently drop credentials still on disk, and a later write would erase them.
InvalidKey(String)
A key outside the grammar; carries it verbatim so the message can quote what was typed.
InvalidEnvironment(String)
An environment name outside the grammar; carries it verbatim.
ValueTooLong
A value over MAX_VALUE_BYTES.
FutureVersion(u32)
The store on disk is a version this build does not understand; carries that version. Nothing was written.
Trait Implementations§
Source§impl Debug for SecretError
impl Debug for SecretError
Source§impl Display for SecretError
impl Display for SecretError
Source§impl Error for SecretError
impl Error for SecretError
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()