Skip to main content

HttpStatus

Trait HttpStatus 

Source
pub trait HttpStatus {
    // Required method
    fn as_u16(&self) -> u16;
}
Expand description

Trait abstracting an HTTP status code so we can test without pulling in reqwest. reqwest::StatusCode and u16 both implement it via the blanket impls below.

Required Methods§

Source

fn as_u16(&self) -> u16

Implementations on Foreign Types§

Source§

impl HttpStatus for u16

Source§

fn as_u16(&self) -> u16

Source§

impl HttpStatus for StatusCode

Available on crate feature http only.
Source§

fn as_u16(&self) -> u16

Implementors§