Struct actix_web::dev::Params
[−]
[src]
pub struct Params<'a>(_);
Route match information
If resource path contains variable patterns, Params
stores this variables.
Methods
impl<'a> Params<'a>
[src]
fn is_empty(&self) -> bool
[src]
Check if there are any matched patterns
fn get(&'a self, key: &str) -> Option<&'a str>
[src]
Get matched parameter by name without type conversion
fn query<T: FromParam>(&'a self, key: &str) -> Result<T, <T as FromParam>::Err>
[src]
Get matched FromParam
compatible parameter by name.
If keyed parameter is not available empty string is used as default value.
fn index(req: HttpRequest) -> Result<String> { let ivalue: isize = req.match_info().query("val")?; Ok(format!("isuze value: {:?}", ivalue)) }
fn iter(&self) -> Iter<(Cow<'a, str>, Cow<'a, str>)>
[src]
Return iterator to items in paramter container