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
sourceimpl Clone for MatcherOptions
impl Clone for MatcherOptions
sourcefn clone(&self) -> MatcherOptions
fn clone(&self) -> MatcherOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MatcherOptions
impl Debug for MatcherOptions
sourceimpl Default for MatcherOptions
impl Default for MatcherOptions
sourceimpl Display for MatcherOptions
impl Display for MatcherOptions
sourceimpl From<MatcherOptions> for PathRegexOptions
impl From<MatcherOptions> for PathRegexOptions
sourcefn from(options: MatcherOptions) -> Self
fn from(options: MatcherOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for MatcherOptions
impl Send for MatcherOptions
impl Sync for MatcherOptions
impl Unpin for MatcherOptions
impl UnwindSafe for MatcherOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more