Struct actix_web::dev::Pattern
[−]
[src]
pub struct Pattern { /* fields omitted */ }
Methods
impl Pattern
[src]
fn new(name: &str, path: &str) -> Self
[src]
Parse path pattern and create new Pattern
instance.
Panics if path pattern is wrong.
fn name(&self) -> &str
[src]
Returns name of the pattern
fn pattern(&self) -> &str
[src]
Returns path of the pattern
fn is_match(&self, path: &str) -> bool
[src]
fn match_with_params<'a>(
&'a self,
path: &'a str,
params: &'a mut Params<'a>
) -> bool
[src]
&'a self,
path: &'a str,
params: &'a mut Params<'a>
) -> bool
fn path<U, I>(
&self,
prefix: Option<&str>,
elements: U
) -> Result<String, UrlGenerationError> where
U: IntoIterator<Item = I>,
I: AsRef<str>,
[src]
&self,
prefix: Option<&str>,
elements: U
) -> Result<String, UrlGenerationError> where
U: IntoIterator<Item = I>,
I: AsRef<str>,
Build pattern path.
Trait Implementations
impl Clone for Pattern
[src]
fn clone(&self) -> Pattern
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Pattern
[src]
fn eq(&self, other: &Pattern) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.