[][src]Struct bravery::request::Request

pub struct Request<T: Clone> {
    pub method: String,
    pub path: String,
    pub params: String,
    pub headers: HashMap<String, String>,
    pub content_type: Option<String>,
    pub content_length: usize,
    pub header_lenght: usize,
    pub body: Vec<u8>,
    pub context: T,
}

Fields

method: Stringpath: Stringparams: Stringheaders: HashMap<String, String>content_type: Option<String>content_length: usizeheader_lenght: usizebody: Vec<u8>context: T

Methods

impl<C: Clone> Request<C>[src]

pub fn body_as<'a, T>(&'a self) -> Result<T> where
    T: Deserialize<'a>, 
[src]

pub fn params_as<'a, T>(&'a self) -> Result<T, Error> where
    T: Deserialize<'a>, 
[src]

Auto Trait Implementations

impl<T> Send for Request<T> where
    T: Send

impl<T> Sync for Request<T> where
    T: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T