[−][src]Struct funck::Request
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,