[−][src]Struct wasm_service::Request
Incoming HTTP request (to Worker).
Implementations
impl Request
[src]
pub fn method(&self) -> Method
[src]
Returns the HTTP method
pub fn url(&self) -> &Url
[src]
Returns the parsed url
pub fn headers(&self) -> &Headers
[src]
Returns the set of request headers
pub fn get_header(&self, name: &str) -> Option<String>
[src]
Returns the value of the header, or None if the header is not set. Header name search is case-insensitive.
pub fn has_header(&self, name: &str) -> bool
[src]
Returns true if the header is set. Name is case-insensitive.
pub fn body(&self) -> Option<&Vec<u8>>
[src]
Returns request body as byte vector, or None if body is empty
pub fn json<T: DeserializeOwned>(&self) -> Result<T, Error>
[src]
Interpret body as json object.
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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.
pub 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>,