path_matcher.match

The module containing the main matching logic and associated symbols.

Members

Classes

PathPatternParseException
class PathPatternParseException

An exception that may be thrown when parsing a path pattern string. This exception will only be thrown if the programmer has made an error in defining their path pattern; NOT if a user-provided URL is incorrect.

Functions

matchPath
PathMatchResult matchPath(string url, string pattern)

Attempts to match a given URL with a given pattern string, and parse any path parameters defined by the pattern.

Structs

PathMatchResult
struct PathMatchResult

Contains the result of attempting to match a URL to a path pattern. This includes whether there is a match at all, and if so, a set of path parameters that were parsed from the URL, according to the path pattern.

PathParam
struct PathParam

Represents a path parameter that was parsed from a URL when matching it against a pattern.

Variables

MAX_PATH_SEGMENTS
size_t MAX_PATH_SEGMENTS;

The maximum number of path segments that this library supports.

PATH_PARAMETER_INTEGRAL_TYPES
string[] PATH_PARAMETER_INTEGRAL_TYPES;

The list of possible integral types that a path parameter can be annotated as. Note that there may be other complex types supported in addition to these; integral types are just listed here so we can generate validation with CTFE.

Meta