pub enum ReadError {
Parse(ParseError),
NotASingleQuery {
count: usize,
},
NotAQuery,
UnsupportedPredicate {
predicate: &'static str,
},
InvalidPredicate {
keyword: &'static str,
reason: String,
},
InvalidKind {
got: String,
},
IncompatiblePredicates {
predicate: &'static str,
kind: KindFilter,
},
}Expand description
Read-path error family. Every variant means the query did not execute; no state was observed or mutated.
Variants§
Parse(ParseError)
Parse failure on the query input.
NotASingleQuery
Input was not a single (query ...) form — the read API
expects exactly one query per call.
NotAQuery
Input parsed as something other than a (query ...) form.
UnsupportedPredicate
Parsed but includes a predicate whose behavior hasn’t been wired yet. 7.1 scope note: see the module docstring.
InvalidPredicate
A predicate’s value had the wrong shape for its keyword
(e.g. :limit @not_a_number).
InvalidKind
:kind was provided with a value that isn’t one of the four
canonical kinds.
IncompatiblePredicates
A predicate was combined with a :kind value it doesn’t
apply to — e.g. :s @alice :kind pro. Per
read-protocol.md § 4.1 the :s / :p predicates are
SEM / INF only; silently returning no records on this input
would violate spec invariant § 13 #9 “no silent information
loss,” so v1 rejects with a typed error.
Fields
kind: KindFilterThe :kind value it was combined with.
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
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()