logo
pub trait Fallible {
    type Error: 'static;
}
Expand description

A type that can produce an error.

This trait is always implemented by serializers and deserializers. Its purpose is to provide an error type without restricting what other capabilities the type must provide.

When writing implementations for Serialize and Deserialize, it’s best practice to bound the serializer or deserializer by Fallible and then require that the serialized types support it (i.e. S: Fallible, MyType: Serialize<S>).

Associated Types

The error produced by any failing methods.

Implementors