rama_http

Type Alias Request

Source
pub type Request<T = Body> = Request<T>;
Expand description

Type alias for http::Request whose body type defaults to Body, the most common body type used with rama.

Aliased Type§

struct Request<T = Body> { /* private fields */ }

Trait Implementations§

Source§

impl FromRequest for Request

Source§

type Rejection = Infallible

If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response.
Source§

async fn from_request(req: Request) -> Result<Self, Self::Rejection>

Perform the extraction.
Source§

impl<Body> HeaderValueGetter for Request<Body>

Source§

fn header_str<K>(&self, key: K) -> Result<&str, HeaderValueErr>
where K: AsHeaderName + Copy,

Get a header value as a string.
Source§

fn header_bytes<K>(&self, key: K) -> Result<&[u8], HeaderValueErr>
where K: AsHeaderName + Copy,

Get a header value as a byte slice.