ErrorToResponse

Trait ErrorToResponse 

Source
pub trait ErrorToResponse: Error {
    // Required method
    fn to_response(&self) -> OutgoingResponse;
}
Available on crate feature server only.
Expand description

Trait for errors that can generate an error response.

Required Methods§

Source

fn to_response(&self) -> OutgoingResponse

Create a custom HTTP error response.

Implementors§