Struct finchers::Context
[−]
[src]
pub struct Context<'b, 'r: 'b> { /* fields omitted */ }
A set of values, contains the incoming HTTP request and the finchers-specific context.
Methods
impl<'r, 'b> Context<'r, 'b>
[src]
fn request(&self) -> &'r Request
[src]
Return the reference of Request
fn take_body(&mut self) -> Option<Body>
[src]
Take and return the instance of request body, if available.
fn next_segment(&mut self) -> Option<&str>
[src]
Pop and return the front element of path segments.
fn collect_remaining_segments<I, T>(&mut self) -> Option<Option<I>> where
I: FromIterator<T>,
T: FromParam,
[src]
I: FromIterator<T>,
T: FromParam,
Collect and return the remaining path segments, if available
fn query<S: AsRef<str>>(&self, name: S) -> Option<&str>
[src]
Return the first value of the query parameter whose name is name
, if exists
fn queries<S: AsRef<str>>(&self, name: S) -> Vec<&str>
[src]
Returns all query parameters with name name
Trait Implementations
impl<'b, 'r: 'b> Debug for Context<'b, 'r>
[src]
impl<'b, 'r: 'b> Clone for Context<'b, 'r>
[src]
fn clone(&self) -> Context<'b, 'r>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more