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
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
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
Mutably borrows from an owned value. Read more