Crate yew_router_route_parser

Source
Expand description

Parser for yew-router’s matcher syntax. This syntax allows specifying if a route should produce an enum variant or struct, and allows capturing sections from the route to be incorporated into its associated variant or struct.

Modules§

parser
Parser that consumes a string and produces the first representation of the matcher.

Structs§

ParseError
Error for parsing the route
PrettyParseError
Parser error that can print itself in a human-readable format.

Enums§

CaptureVariant
Variants that indicate how part of a string should be captured.
FieldNamingScheme
Indicates if the parser is working to create a matcher for a datastructure with named or unnamed fields.
MatcherToken
Tokens used to determine how to match and capture sections from a URL.

Functions§

convert_tokens
Converts a slice of RouteParserToken into a Vec of MatcherTokens.
parse_str_and_optimize_tokens
Parse the provided “matcher string” and then optimize the tokens.

Type Aliases§

Captures
Alias of HashMap<&'a str, String> that represent strings captured from a route.