1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

add path and query extractors

This commit is contained in:
Nikolay Kim
2018-03-26 15:58:30 -07:00
parent a56e5113ee
commit 68cf32e848
9 changed files with 290 additions and 3 deletions

View File

@@ -46,6 +46,11 @@ impl<'a> Params<'a> {
self.0.is_empty()
}
/// Check number of extracted parameters
pub fn len(&self) -> usize {
self.0.len()
}
/// Get matched parameter by name without type conversion
pub fn get(&'a self, key: &str) -> Option<&'a str> {
for item in self.0.iter() {