#[non_exhaustive]pub enum KvError {
Io(Error),
Decode(Error),
InvalidKey(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 BarkError, so callers keep
the underlying diagnostic through core::error::Error::source; this
type does not derive Clone/PartialEq/Eq as a result.
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 keys still on disk.
InvalidKey(String)
A key outside the grammar; carries it verbatim so the message can quote what was typed.
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 Error for KvError
impl Error for KvError
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()