Struct treemux::Params [−][src]
Expand description
A Vec
of Param
returned by a route match.
There are two ways to retrieve the value of a parameter:
- by the name of the parameter
let user = params.get("user"); // defined by :user or *user
- by the index of the parameter. This way you can also get the name (key)
let third_key = ¶ms[2].key; // the name of the 3rd parameter
let third_value = ¶ms[2].value; // the value of the 3rd parameter
Tuple Fields
0: Vec<Param>
Implementations
Returns the value of the first Param
whose key matches the given name.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Params
impl UnwindSafe for Params
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more