http

Trait StatusCode

Source
pub trait StatusCode {
    // Required methods
    fn is_http_ok(&self) -> bool;
    fn is_http_err(&self) -> bool;
    fn status_msg(&self) -> &'static str;
}

Required Methods§

Source

fn is_http_ok(&self) -> bool

Returns true if the status code of the request represents an OK status (200-300)

Source

fn is_http_err(&self) -> bool

Returns true if the status code of the request doesn’t represent an OK status (200-300)

Source

fn status_msg(&self) -> &'static str

Get a human-readable description of the request’s status code

Implementations on Foreign Types§

Source§

impl StatusCode for u16

Source§

fn is_http_ok(&self) -> bool

Source§

fn is_http_err(&self) -> bool

Source§

fn status_msg(&self) -> &'static str

Implementors§