pub trait ApiError: Debug + Display + Serialize + DeserializeOwned {
    fn connection_closed() -> Self;
    fn request_dropped() -> Self;
    fn internal<E: Error>(error: E) -> Self;
    fn request<E: Error>(error: E) -> Self;
    fn response<E: Error>(error: E) -> Self;
    fn other<E: Error>(other: E) -> Self;
}
Expand description

The error that is sent if something goes wrong while responding to a request.

Panics

If deserialization or serialization failes this will result in a panic

Required Methods§

Server

Get’s called if the data that is needed for the request was not found.

Or if the response could not be serialized.

Server

If the server receives an error as a request. This should never happen.

If the request could not be serialized.

Client

Get’s called when a request could not be serialized.

Client

Get’s called when an response from the server could not be deserialized.

Client

Get’s called if a StreamError occured which is not classified

Implementors§