[][src]Struct deadwiki::request::Request

pub struct Request { /* fields omitted */ }

Implementations

impl Request[src]

pub fn new(req: TinyRequest) -> Request[src]

Make a new Request.

pub fn method(&self) -> &Method[src]

HTTP Method

pub fn url(&self) -> &str[src]

URL requested

pub fn headers(&self) -> &[Header][src]

Headers for this request.

pub fn param(&mut self, name: &str) -> &str[src]

Return a value in a POST

or ?querystring= Always gives a string. Will be empty if param wasn't sent. Use has_param() to check if it exists.

pub fn has_param(&mut self, name: &str) -> bool[src]

Has the given param been set?

pub fn as_reader(&mut self) -> &mut dyn Read[src]

Provide io::Read

pub fn respond<R>(self, res: Response<R>) -> Result<(), Error> where
    R: Read
[src]

Respond to this request. Consumes.

pub fn page_names(&self) -> Vec<String>[src]

All the wiki pages, in alphabetical order.

pub fn handle(self) -> Result<(), Error>[src]

Request handler. Consumes.

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.