pub enum MatcherToken {
Exact(String),
Capture(CaptureVariant),
End,
}
Expand description
Tokens used to determine how to match and capture sections from a URL.
Variants
Exact(String)
Section-related tokens can be condensed into a match.
Capture(CaptureVariant)
Capture section.
End
End token - if the string hasn’t been consumed entirely, then the parse will fail. This is useful for being able to specify more general matchers for variants that would otherwise match above more specific variants.
Trait Implementations
sourceimpl Clone for MatcherToken
impl Clone for MatcherToken
sourcefn clone(&self) -> MatcherToken
fn clone(&self) -> MatcherToken
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 more
sourceimpl Debug for MatcherToken
impl Debug for MatcherToken
sourceimpl<'a> From<CaptureOrExact<'a>> for MatcherToken
impl<'a> From<CaptureOrExact<'a>> for MatcherToken
sourcefn from(value: CaptureOrExact<'a>) -> Self
fn from(value: CaptureOrExact<'a>) -> Self
Performs the conversion.
sourceimpl PartialEq<MatcherToken> for MatcherToken
impl PartialEq<MatcherToken> for MatcherToken
sourcefn eq(&self, other: &MatcherToken) -> bool
fn eq(&self, other: &MatcherToken) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MatcherToken) -> bool
fn ne(&self, other: &MatcherToken) -> bool
This method tests for !=
.
impl StructuralPartialEq for MatcherToken
Auto Trait Implementations
impl RefUnwindSafe for MatcherToken
impl Send for MatcherToken
impl Sync for MatcherToken
impl Unpin for MatcherToken
impl UnwindSafe for MatcherToken
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more