Trait destream::de::Error [−][src]
The Error
trait allows FromStream
implementations to create descriptive
error messages belonging to their Decoder
context.
Most implementors should only need to provide the Error::custom
method
and inherit the default behavior for the other methods.
Based on serde::de::Error
.
Required methods
fn custom<T: Display>(msg: T) -> Self
[src]
Raised when there is general error when decoding a type. The message should not be capitalized and should not end with a period.
Provided methods
fn invalid_type<U: Display, E: Display>(unexp: U, exp: E) -> Self
[src]
Raised when FromStream
receives a type different from what it was expecting.
fn invalid_value<U: Display, E: Display>(unexp: U, exp: E) -> Self
[src]
Raised when FromStream
receives a value of the right type but that
is wrong for some other reason.
fn invalid_length<E: Display>(len: usize, exp: E) -> Self
[src]
Raised when decoding a sequence or map and the input data contains too many or too few elements.