[−][src]Struct uri_pattern_matcher::UriPattern
Struct used to parse strings as patterns - Check if an incoming string matches a pattern - Pattern Comparison
Implementations
impl<'_> UriPattern<'_>
[src]
pub fn is_match(&self, candidate: &str) -> bool
[src]
Method used to check if a candidate string matches against the pattern
Example
use uri_pattern_matcher::UriPattern; let pattern: UriPattern = "/api/{resource}/{id}/details".into(); assert!(pattern.is_match("/api/resource/id1/details")); assert!(pattern.is_match("/api/customer/John/details"));
Trait Implementations
impl<'a> Clone for UriPattern<'a>
[src]
pub fn clone(&self) -> UriPattern<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for UriPattern<'a>
[src]
impl<'a> From<&'a str> for UriPattern<'a>
[src]
impl<'_> PartialEq<UriPattern<'_>> for UriPattern<'_>
[src]
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'_> PartialOrd<UriPattern<'_>> for UriPattern<'_>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for UriPattern<'a>
[src]
impl<'a> Send for UriPattern<'a>
[src]
impl<'a> Sync for UriPattern<'a>
[src]
impl<'a> Unpin for UriPattern<'a>
[src]
impl<'a> UnwindSafe for UriPattern<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,