Struct rustful::handler::Variables
[−]
[src]
pub struct Variables<H> { /* fields omitted */ }
Assigns names to route variables.
It's technically a single-item router, with the purpose of pairing route variable names with input values, but it has to come after other routers, since it has be at the end of a router chain to know what variables to use. It won't do any other routing work, so make sure to pair it with, at least, a path based router.
Trait Implementations
impl<H: Clone> Clone for Variables<H>
[src]
impl<H: Clone> Clone for Variables<H>
fn clone(&self) -> Variables<H>
[src]
fn clone(&self) -> Variables<H>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: FromHandler<H>, H> FromHandler<H> for Variables<T>
[src]
impl<T: FromHandler<H>, H> FromHandler<H> for Variables<T>
fn from_handler(context: BuilderContext, handler: H) -> Variables<T>
[src]
fn from_handler(context: BuilderContext, handler: H) -> Variables<T>
Create a handler from another handler and a BuilderContext
.
impl<T: ApplyContext> ApplyContext for Variables<T>
[src]
impl<T: ApplyContext> ApplyContext for Variables<T>
fn apply_context(&mut self, context: BuilderContext)
[src]
fn apply_context(&mut self, context: BuilderContext)
Set properties, based on a given context.
fn prepend_context(&mut self, context: BuilderContext)
[src]
fn prepend_context(&mut self, context: BuilderContext)
Prepend existing properties, based on a given context.
impl<T: Merge> Merge for Variables<T>
[src]
impl<T: Merge> Merge for Variables<T>
fn merge(&mut self, other: Variables<T>)
[src]
fn merge(&mut self, other: Variables<T>)
Combine this handler with another, overwriting conflicting properties.
impl<'a, H: Build<'a>> Build<'a> for Variables<H>
[src]
impl<'a, H: Build<'a>> Build<'a> for Variables<H>
type Builder = H::Builder
The type that provides the builder API.
fn get_builder(&'a mut self, context: BuilderContext) -> Self::Builder
[src]
fn get_builder(&'a mut self, context: BuilderContext) -> Self::Builder
Get the builder type for this type, and prepare it with a context.
impl<H: HandleRequest> HandleRequest for Variables<H>
[src]
impl<H: HandleRequest> HandleRequest for Variables<H>
fn handle_request<'a, 'b, 'l, 'g>(
&self,
environment: Environment<'a, 'b, 'l, 'g>
) -> Result<(), Environment<'a, 'b, 'l, 'g>>
[src]
fn handle_request<'a, 'b, 'l, 'g>(
&self,
environment: Environment<'a, 'b, 'l, 'g>
) -> Result<(), Environment<'a, 'b, 'l, 'g>>
Try to handle an incoming request from the client, or return the request environment to the parent handler. Read more
fn hyperlinks<'a>(&'a self, base: Link<'a>) -> Vec<Link<'a>>
[src]
fn hyperlinks<'a>(&'a self, base: Link<'a>) -> Vec<Link<'a>>
List all of the hyperlinks into this handler, based on the provided base link. It's up to the handler implementation to decide how deep to go. Read more
impl<H: Default> Default for Variables<H>
[src]
impl<H: Default> Default for Variables<H>