#[non_exhaustive]pub enum StoreError {
Commit(CommitError),
NotFound {
kind: &'static str,
id: String,
},
Conflict {
kind: &'static str,
id: String,
},
Invalid(ValidationReport),
Parse(ParseError),
Json(Error),
Engine {
engine: &'static str,
message: String,
},
Unsupported {
engine: &'static str,
what: &'static str,
spec_ref: &'static str,
},
}Expand description
What went wrong.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Commit(CommitError)
The commit would produce a history that reads back and does not connect.
Wraps the openehr crate’s own rules rather than restating them, so the
database and the library cannot disagree about what a valid history is.
NotFound
The record, container, or version named does not exist.
Fields
Conflict
The record already exists.
Invalid(ValidationReport)
A stored document failed Reference Model validation on the way in.
The store validates before it writes. A store that accepted an invalid
composition would make every later reader’s validate() fail on data it
cannot fix.
Parse(ParseError)
A value could not be parsed or built.
Json(Error)
Canonical JSON could not be written or read.
Engine
The engine reported an error.
A string, because the five drivers have five unrelated error types and this crate does not depend on any of them. The engine crate is expected to have logged the typed error already.
Fields
Unsupported
The operation is defined by this crate and not implemented by this engine.
Never a silent no-op. An engine crate at a conformance level below
Store returns this rather than pretending.
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
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()