pub struct PathParams(pub Vec<(String, String)>);Expand description
Extracted path parameters stored in request extensions.
This type is set by the router after matching a route and extracting
path parameters. The Path extractor retrieves this from the request.
§Example
For a route /users/{user_id}/posts/{post_id} matched against
/users/42/posts/99, this would contain:
[("user_id", "42"), ("post_id", "99")]
Tuple Fields§
§0: Vec<(String, String)>Implementations§
Source§impl PathParams
impl PathParams
Sourcepub fn from_pairs(pairs: Vec<(String, String)>) -> Self
pub fn from_pairs(pairs: Vec<(String, String)>) -> Self
Create from a vector of name-value pairs.
Trait Implementations§
Source§impl Clone for PathParams
impl Clone for PathParams
Source§fn clone(&self) -> PathParams
fn clone(&self) -> PathParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathParams
impl Debug for PathParams
Source§impl Default for PathParams
impl Default for PathParams
Source§fn default() -> PathParams
fn default() -> PathParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PathParams
impl RefUnwindSafe for PathParams
impl Send for PathParams
impl Sync for PathParams
impl Unpin for PathParams
impl UnwindSafe for PathParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).