[][src]Struct yew_router::matcher::RouteMatcher

pub struct RouteMatcher {
    pub tokens: Vec<MatcherToken>,
    pub settings: MatcherSettings,
}

Attempts to match routes, transform the route to Component props and render that Component.

Fields

tokens: Vec<MatcherToken>

Tokens used to determine how the matcher will match a route string.

settings: MatcherSettings

Settings

Implementations

impl RouteMatcher[src]

pub fn try_from(i: &str) -> Result<Self, PrettyParseError>[src]

Attempt to create a RouteMatcher from a "matcher string".

pub fn new(i: &str, settings: MatcherSettings) -> Result<Self, PrettyParseError>[src]

Creates a new Matcher with settings.

pub fn capture_route_into_map<'a, 'b: 'a>(
    &'b self,
    i: &'a str
) -> IResult<&'a str, Captures<'a>>
[src]

Match a route string, collecting the results into a map.

pub fn capture_route_into_vec<'a, 'b: 'a>(
    &'b self,
    i: &'a str
) -> IResult<&'a str, Vec<String>>
[src]

Match a route string, collecting the results into a vector.

pub fn capture_names(&self) -> HashSet<&str>[src]

Gets a set of all names that will be captured. This is useful in determining if a given struct will be able to be populated by a given path matcher before being given a concrete path to match.

Trait Implementations

impl Clone for RouteMatcher[src]

impl Debug for RouteMatcher[src]

impl PartialEq<RouteMatcher> for RouteMatcher[src]

impl StructuralPartialEq for RouteMatcher[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.