pub struct Params(/* private fields */);Expand description
Route parameters captured from the path (/users/{id}).
Implementations§
Source§impl Params
impl Params
pub fn raw(&self, key: &str) -> Option<&str>
Sourcepub fn get<T: DeserializeOwned>(&self, key: &str) -> Result<T>
pub fn get<T: DeserializeOwned>(&self, key: &str) -> Result<T>
A parameter the route declares. Absence means the route pattern and the action disagree, which is a bug in the app rather than bad input.
pub fn try_get<T: DeserializeOwned>(&self, key: &str) -> Result<Option<T>>
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 UnsafeUnpin 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