mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 09:42:40 +01:00
add parameter container iterator
This commit is contained in:
parent
6bb893deab
commit
8941557da6
@ -2,6 +2,7 @@ use std;
|
|||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
use std::slice::Iter;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
|
|
||||||
@ -77,6 +78,11 @@ impl<'a> Params<'a> {
|
|||||||
T::from_param("")
|
T::from_param("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return iterator to items in paramter container
|
||||||
|
pub fn iter(&self) -> Iter<(Cow<'a, str>, Cow<'a, str>)> {
|
||||||
|
self.0.iter()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'b, 'c: 'a> Index<&'b str> for &'c Params<'a> {
|
impl<'a, 'b, 'c: 'a> Index<&'b str> for &'c Params<'a> {
|
||||||
|
Loading…
Reference in New Issue
Block a user