Struct nickel::Request [] [src]

pub struct Request<'a, 'b, 'k> {
    pub origin: HyperRequest<'a, 'k>,
    pub route_result: Option<RouteResult<'b>>,
    // some fields omitted
}

A container for all the request data

Fields

origin

the original hyper::server::Request

route_result

a HashMap<String, String> holding all params with names and values

Methods

impl<'a, 'b, 'k> Request<'a, 'b, 'k>

fn from_internal(req: HyperRequest<'a, 'k>) -> Request<'a, 'b, 'k>

fn param(&self, key: &str) -> Option<&str>

fn path_without_query(&self) -> Option<&str>

Trait Implementations

impl<'a, 'b, 'k> Extensible for Request<'a, 'b, 'k>

fn extensions(&self) -> &TypeMap

fn extensions_mut(&mut self) -> &mut TypeMap

impl<'a, 'b, 'k> Pluggable for Request<'a, 'b, 'k>

fn get<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>, Self: Extensible, P::Value: Clone, P::Value: Any

fn get_ref<P>(&mut self) -> Result<&P::Value, P::Error> where Self: Extensible, P: Plugin<Self>, P::Value: Any

fn get_mut<P>(&mut self) -> Result<&mut P::Value, P::Error> where Self: Extensible, P: Plugin<Self>, P::Value: Any

fn compute<P>(&mut self) -> Result<P::Value, P::Error> where P: Plugin<Self>

impl<'a, 'b, 'k> JsonBody for Request<'a, 'b, 'k>

fn json_as<T: Decodable>(&mut self) -> Result<T, Error>

impl<'a, 'b, 'k> QueryString for Request<'a, 'b, 'k>

fn query(&mut self) -> &Query