Struct path2regex::MatcherOptions
source · pub struct MatcherOptions {
pub delimiter: String,
pub prefixes: String,
pub sensitive: bool,
pub strict: bool,
pub end: bool,
pub start: bool,
pub ends_with: String,
pub encode: for<'a> fn(_: &'a str) -> String,
pub decode: for<'a> fn(_: &'a str, _: &'a Key) -> String,
}
Available on crate feature
match
only.Expand description
The Configuration of the Matcher
Fields§
§delimiter: String
Set the default delimiter for repeat parameters. (default: '/#?'
)
prefixes: String
List of characters to automatically consider prefixes when parsing.
sensitive: bool
When true
the regexp will be case sensitive. (default: false
)
strict: bool
When true
the regexp won’t allow an optional trailing delimiter to match. (default: false
)
end: bool
When true
the regexp will match to the end of the string. (default: true
)
start: bool
When true
the regexp will match from the beginning of the string. (default: true
)
ends_with: String
List of characters that can also be “end” characters.
encode: for<'a> fn(_: &'a str) -> String
Encode path tokens for use in the Regex
.
decode: for<'a> fn(_: &'a str, _: &'a Key) -> String
Function for decoding strings for params.
Trait Implementations§
source§impl Clone for MatcherOptions
impl Clone for MatcherOptions
source§fn clone(&self) -> MatcherOptions
fn clone(&self) -> MatcherOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MatcherOptions
impl Debug for MatcherOptions
source§impl Default for MatcherOptions
impl Default for MatcherOptions
source§impl Display for MatcherOptions
impl Display for MatcherOptions
source§impl From<MatcherOptions> for PathRegexOptions
impl From<MatcherOptions> for PathRegexOptions
source§fn from(options: MatcherOptions) -> Self
fn from(options: MatcherOptions) -> Self
Converts to this type from the input type.