Struct actix_web::dev::Pattern
[−]
[src]
pub struct Pattern { /* fields omitted */ }
Methods
impl Pattern[src]
fn new(name: &str, path: &str, starts: &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 update_match_info<S>(&self, req: &mut HttpRequest<S>, prefix: usize)[src]
Extract pattern parameters from the text
fn get_match_info<'a>(&self, text: &'a str) -> HashMap<&str, &'a str>[src]
Extract pattern parameters from the text
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) -> bool1.0.0[src]
This method tests for !=.