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§
Sourcefn is_http_ok(&self) -> bool
fn is_http_ok(&self) -> bool
Returns true if the status code of the request represents an OK status (200-300)
Sourcefn is_http_err(&self) -> bool
fn is_http_err(&self) -> bool
Returns true if the status code of the request doesn’t represent an OK status (200-300)
Sourcefn status_msg(&self) -> &'static str
fn status_msg(&self) -> &'static str
Get a human-readable description of the request’s status code