1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
use crate::{
    http::{self, Response},
    url, FromContentError, ToContentError,
};
use std::fmt::{Debug, Display};
pub trait Error = From<url::ParseError>
    + From<http::Error>
    + From<ToContentError>
    + From<FromContentError>
    + From<Unexpected>
    + Display
    + Debug;

pub enum Unexpected {
    UnexpectedContentType(Response<Vec<u8>>),
    UnexpectedStatusCode(Response<Vec<u8>>),
}