pub enum StoreError {
Decode {
key: RecordKey,
reason: String,
},
CodecOpen {
key: RecordKey,
},
UnknownRecordLayout {
key: RecordKey,
},
}Expand description
Every error Store::load or a mutation can return. All three variants
name the offending RecordKey — nothing here fails silently or points
only at “a record”, ever.
Variants§
Decode
The record’s own bytes (after a successful RecordCodec::open)
don’t match what this key’s kind expects — non-UTF-8 bytes where a
sync token string was expected, JSON that doesn’t parse as an
[OutgoingRequest], and so on.
Fields
CodecOpen
RecordCodec::open rejected a record’s sealed bytes outright —
wrong key, corrupted bytes, or (for the real AES-GCM codec a later
piece adds) an authentication failure.
UnknownRecordLayout
The key’s kind segment (e.g. "olm_session") is recognized, but the
rest of the key does not match that kind’s expected shape. Distinct
from a genuinely unrecognized kind, which Store::load keeps
verbatim rather than treating as an error — see the module doc’s
“Forward compatibility” section.
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()