Enum yew_router_nested_route_parser::parser::RefCaptureVariant[][src]

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

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

Fields

sections: usize

Number of sections to match.

{5}

Named(&'a str)

Tuple Fields

0: &'a str

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

ManyNamed(&'a str)

Tuple Fields

0: &'a str

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

NumberedNamed

Fields

sections: usize

Number of sections to match.

name: &'a str

The key to be entered in the Matches map.

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.