[][src]Enum yew_router_route_parser::parser::RefCaptureVariant

pub enum RefCaptureVariant<'a> {
    Unnamed,
    ManyUnnamed,
    NumberedUnnamed {
        sections: usize,
    },
    Named(&'a str),
    ManyNamed(&'a str),
    NumberedNamed {
        sections: usize,
        name: &'a str,
    },
}

Token representing various types of captures.

It can capture and discard for unnamed variants, or capture and store in the Matches for the named variants.

Its name stems from the fact that it does not have ownership over all its values. It gets converted to CaptureVariant, a nearly identical enum that has owned Strings instead.

Variants

Unnamed

{}

ManyUnnamed

{*}

NumberedUnnamed

{5}

Fields of NumberedUnnamed

sections: usize

Number of sections to match.

Named(&'a str)

{name} - captures a section and adds it to the map with a given name.

ManyNamed(&'a str)

{*:name} - captures over many sections and adds it to the map with a given name.

NumberedNamed

{2:name} - captures a fixed number of sections with a given name.

Fields of NumberedNamed

sections: usize

Number of sections to match.

name: &'a str

The key to be entered in the Matches map.

Trait Implementations

impl<'a> Clone for RefCaptureVariant<'a>[src]

impl<'a> Copy for RefCaptureVariant<'a>[src]

impl<'a> Debug for RefCaptureVariant<'a>[src]

impl<'a> From<RefCaptureVariant<'a>> for CaptureVariant[src]

impl<'a> PartialEq<RefCaptureVariant<'a>> for RefCaptureVariant<'a>[src]

impl<'a> StructuralPartialEq for RefCaptureVariant<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for RefCaptureVariant<'a>

impl<'a> Send for RefCaptureVariant<'a>

impl<'a> Sync for RefCaptureVariant<'a>

impl<'a> Unpin for RefCaptureVariant<'a>

impl<'a> UnwindSafe for RefCaptureVariant<'a>

Blanket Implementations

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

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

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

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.