pub enum DispatchError {
UnknownSignature(QualifiedName),
NoImplementation(QualifiedName),
NoneAvailable {
sig: QualifiedName,
skipped: Vec<String>,
},
Unusable {
id: String,
reason: String,
},
BadArgument {
sig: QualifiedName,
index: usize,
errors: Vec<ValueError>,
},
TypeArity {
sig: QualifiedName,
expected: usize,
got: usize,
},
BoundNotMet {
sig: QualifiedName,
param: Ident,
arg: String,
bound: String,
},
Arity {
sig: QualifiedName,
expected: usize,
got: usize,
},
BadResult {
id: String,
sig: QualifiedName,
errors: Vec<ValueError>,
},
Exec {
id: String,
source: ExecError,
},
}Expand description
Why a call did not reach an implementation at all.
Variants§
UnknownSignature(QualifiedName)
The workspace has no such signature.
NoImplementation(QualifiedName)
Nothing has been registered that proves it.
NoneAvailable
Everything that proves it is out of reach here.
Fields
sig: QualifiedNameThe signature being called.
Unusable
A specific implementation was asked for and cannot be used.
BadArgument
The arguments were not what the signature takes.
Fields
sig: QualifiedNameThe signature being called.
errors: Vec<ValueError>What was wrong with it.
TypeArity
The wrong number of type arguments.
A generic proposition is a claim about every type at once, and a value has one type, so the call has to say which type it is at before anything can be checked against it.
Fields
sig: QualifiedNameThe signature being called.
BoundNotMet
A type argument that is not what its parameter is bounded by.
pick<T: Named> says something about every T that has a name, and
nothing about one that does not, so it cannot be asked at one.
Fields
sig: QualifiedNameThe signature being called.
Arity
The wrong number of arguments.
Fields
sig: QualifiedNameThe signature being called.
BadResult
An implementation returned something that is not what it promised.
This is the one failure that never falls back. The point of checking both sides of the boundary is to catch a proof that does not prove what it claims, and quietly asking someone else would defeat it.
Fields
sig: QualifiedNameWhat it claimed to prove.
errors: Vec<ValueError>How the result fell short.
Exec
Running it failed.
Trait Implementations§
Source§impl Debug for DispatchError
impl Debug for DispatchError
Source§impl Display for DispatchError
impl Display for DispatchError
Source§impl Error for DispatchError
impl Error for DispatchError
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()