pub enum SessionStoreError {
Backend(String),
}Expand description
Error returned by a SessionStore when the backing store could not
satisfy a request. Distributed backends (e.g. Valkey) surface
connectivity/timeout/protocol failures and undecodable responses
here so callers can fail closed rather than silently treating a
backend failure as “no accumulated labels”.
String-typed deliberately, matching the trait’s own philosophy (see
the module header): the error stays free of backend-specific types so
non-CMF bridges and the cross-crate cpex-session-valkey backend can
construct it without dragging dependencies into this surface.
Note the distinction this enables: a positively-confirmed key-miss
(unknown session) is Ok(empty), NOT an error — only a genuine
backend failure is an Err.
Variants§
Backend(String)
The backing store was unreachable, timed out, returned an error, or returned a response that could not be decoded into the expected representation. Callers fail closed on this.
Trait Implementations§
Source§impl Debug for SessionStoreError
impl Debug for SessionStoreError
Source§impl Display for SessionStoreError
impl Display for SessionStoreError
Source§impl Error for SessionStoreError
impl Error for SessionStoreError
1.30.0 · 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()