pub enum MemoryError {
Store(StoreError),
InvalidScope(String),
InvalidBody(String),
InvalidConfidence(f64),
NotFound(i64),
AlreadySuperseded {
id: i64,
by: i64,
},
Corrupt(String),
InvalidBudget(String),
}Expand description
Errors raised when writing or forgetting a memory record.
Variants§
Store(StoreError)
The underlying store failed.
InvalidScope(String)
A scope was empty, over-long, or carried a control character or surrounding whitespace.
InvalidBody(String)
A body was empty, whitespace-only, or longer than MAX_MEMORY_BODY.
InvalidConfidence(f64)
A confidence was offered that is not a probability.
NotFound(i64)
A record was named that is not in the store.
AlreadySuperseded
A record was named as superseded that another record has already superseded. The chain stays a chain: re-pointing it would orphan the successor already recorded.
Corrupt(String)
A stored row could not be interpreted (database corruption).
InvalidBudget(String)
CACHE_BUDGET_ENV was set to something that is not a budget. Refused
rather than ignored: running the default under a name that says otherwise
is how an operator ends up believing in a bound that was never applied.
Trait Implementations§
Source§impl Debug for MemoryError
impl Debug for MemoryError
Source§impl Display for MemoryError
impl Display for MemoryError
Source§impl Error for MemoryError
impl Error for MemoryError
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()