pub struct PathParams { /* private fields */ }Expand description
Path parameters with stack-optimized storage.
Uses SmallVec to store up to 4 key-value pairs on the stack,
avoiding heap allocation for the common case.
Implementations§
Source§impl PathParams
impl PathParams
Sourcepub fn new() -> PathParams
pub fn new() -> PathParams
Create a new empty path params collection.
Sourcepub fn with_capacity(capacity: usize) -> PathParams
pub fn with_capacity(capacity: usize) -> PathParams
Create path params with pre-allocated capacity.
Sourcepub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Check if a key exists.
Sourcepub fn to_hashmap(&self) -> HashMap<String, String>
pub fn to_hashmap(&self) -> HashMap<String, String>
Convert to a HashMap (for backwards compatibility).
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
Source§impl<'a> FromIterator<(&'a str, &'a str)> for PathParams
impl<'a> FromIterator<(&'a str, &'a str)> for PathParams
Source§fn from_iter<I>(iter: I) -> PathParams
fn from_iter<I>(iter: I) -> PathParams
Creates a value from an iterator. Read more
Source§impl FromIterator<(String, String)> for PathParams
impl FromIterator<(String, String)> for PathParams
Source§fn from_iter<I>(iter: I) -> PathParams
fn from_iter<I>(iter: I) -> PathParams
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a PathParams
impl<'a> IntoIterator for &'a PathParams
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