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

pub struct Request<C: Clone + Sync + Send> {
    pub method: String,
    pub path: String,
    pub query_string: String,
    pub headers: HashMap<String, String>,
    pub content_type: Option<String>,
    pub content_length: usize,
    pub header_lenght: usize,
    pub body: Vec<u8>,
    pub logger: Logger,
    pub context: C,
}

Fields

method: Stringpath: Stringquery_string: Stringheaders: HashMap<String, String>content_type: Option<String>content_length: usizeheader_lenght: usizebody: Vec<u8>logger: Loggercontext: C

Methods

impl<C: Clone + Sync + Send> Request<C>[src]

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

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

Auto Trait Implementations

impl<C> Send for Request<C>

impl<C> Sync for Request<C>

impl<C> Unpin for Request<C> where
    C: Unpin

impl<C> UnwindSafe for Request<C> where
    C: UnwindSafe

impl<C> RefUnwindSafe for Request<C> where
    C: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]