pub enum DslError {
Show 16 variants
Empty,
TooManyOps {
count: usize,
max: usize,
},
UnexpectedChar {
pos: usize,
found: char,
expected: &'static str,
},
UnexpectedEof {
expected: &'static str,
},
InvalidIdentifier {
pos: usize,
},
DuplicateArg {
name: String,
},
InvalidValue {
pos: usize,
error: String,
},
InvalidJson {
error: String,
},
UnclosedString,
UnclosedBracket {
kind: char,
},
PrevRefOutsideChain {
pos: usize,
},
PrevRefInJsonForm {
arg_name: String,
},
MixedSeparators,
EmptyBatch,
UnsupportedVerbNesting {
pos: usize,
},
WriteKeyConflict {
id: String,
first_op: String,
second_op: String,
},
}Expand description
Parser error — surfaced as invalid_params at the MCP boundary.
Variants§
Empty
TooManyOps
UnexpectedChar
UnexpectedEof
InvalidIdentifier
DuplicateArg
InvalidValue
InvalidJson
UnclosedString
UnclosedBracket
PrevRefOutsideChain
$prev reference used outside a chain context (emitted by the parser for
Single-op and Parallel-batch forms, and for JSON form).
§Policy
$prev references are only meaningful in chain (|) mode. If they appear
in a non-chain context the parser rejects the request here so downstream
consumers that pattern-match on DslError get a typed error rather than
a runtime string.
PrevRefInJsonForm
$prev found in JSON-form input — JSON form does not support chains.
JSON form ([{"tool":"...","args":{...}},...]) always runs in parallel.
To use $prev substitution, use the function-call DSL with the | chain
operator: verb1(...) | verb2(id=$prev.id).
MixedSeparators
Mixing , and | at the top level.
EmptyBatch
Empty batch [] — no ops provided.
UnsupportedVerbNesting
Dotted verb name with more than one level (e.g. a.b.c). Only
single-level dotted names are supported (a.b).
WriteKeyConflict
Two or more ops in a parallel batch write to the same UUID (ADR-038).
Write-key conflict detection is a preflight check applied after parsing.
Write ops are: update, delete, merge, link. When two ops share the
same id (or into_id / from_id for merge, source_id/target_id
for link) the batch is rejected before any op is dispatched.
Trait Implementations§
Source§impl Error for DslError
impl Error for DslError
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()