InputErrorKind#
The category of an InputError: input that couldn't be decoded, or input that decoded but broke a validation rule. Read it from InputError::kind after matching Error::Input.
Declaration#
With the serde feature, InputErrorKind implements Serialize and Deserialize as "parse" and "validation".
Variants#
| Variant | When it occurs |
|---|---|
Parse |
JSON input couldn't be decoded. Only the separate plen-wire decoding crate produces it; no call in plen-core returns it. The error's path is None. |
Validation |
The data or options passed to a call break a validation rule. Every Error::Input returned by a plen-core call has this kind, as does a converted MatchError::Invalid. InputError::validation builds an error of this kind. |
Example#
use ;
Related#
InputError- carries the kind inkindError- wraps the input error inError::Input- Error handling - shows how to report input errors