[][src]Struct funck::Request

pub struct Request { /* fields omitted */ }

Structure for getting data into a funcktion.

The Request is normally constructed automatically by the funck server, altough it can be useful to use the struct directly in unit tests. A Request is mainly composed of two things: a body (As Vec<u8>) and metadata (As HashMap<String, String>).

When a funcktion is exposed as an HTTP route, the headers of the request are converted by the server into request metadata.

Methods

impl Request[src]

pub fn new(body: Vec<u8>, metadata: HashMap<String, String>) -> Request[src]

pub fn body(&self) -> &[u8][src]

pub fn metadata(&self) -> &HashMap<String, String>[src]

Auto Trait Implementations

impl RefUnwindSafe for Request

impl Send for Request

impl Sync for Request

impl Unpin for Request

impl UnwindSafe for Request

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.