pub enum DispatchError {
UnknownProcedure(String),
Deserialize(Error),
Serialize(Error),
RawBody,
MissingInjection(&'static str),
MissingState(&'static str),
MissingChannel(&'static str),
Invalid(ValidationError),
}Expand description
Error returned by a generated dispatch when a call cannot reach
or leave the procedure. Wire-level failures only – a procedure’s
own failures belong in its return type.
Variants§
UnknownProcedure(String)
No procedure with the requested name exists in this set.
Deserialize(Error)
The arguments failed to deserialize into the procedure’s parameter types.
Serialize(Error)
The procedure’s return value failed to serialize.
RawBody
The invoke arrived with a raw byte body; procedures take JSON named arguments.
MissingInjection(&'static str)
A parameter is injected by type, but the call’s [Context]
offered no value of that type.
MissingState(&'static str)
A State<T> parameter was requested, but no value of that type
is managed – the app never called .manage() for it.
MissingChannel(&'static str)
A Channel<T> parameter was requested, but the dispatch
[Context] carried no channel factory. The handler always
installs one from the webview, so this arises only when
dispatching against a bare [Context] (no with_channels).
Invalid(ValidationError)
The payload failed runtime validation against the command’s schema.
Only produced by handler_validated, under the validate feature;
rejected at the boundary, before the procedure runs.
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()