pub struct Params { /* private fields */ }Expand description
A list of parameters returned by a route match.
let matched = router.at("/users/1")?;
// you can get a specific value by key
let id = matched.params.get("id");
assert_eq!(id, Some("1"));
// or iterate through the keys and values
for (key, value) in matched.params.iter() {
println!("key: {}, value: {}", key, value);
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more