pub struct AntMatchers { /* private fields */ }Expand description
Collection of AntMatchers for efficient path matching
Implementations§
Source§impl AntMatchers
impl AntMatchers
Sourcepub fn new() -> AntMatchers
pub fn new() -> AntMatchers
Create an empty collection
Sourcepub fn add(self, pattern: &str) -> AntMatchers
pub fn add(self, pattern: &str) -> AntMatchers
Add a pattern to the collection
Sourcepub fn add_all(self, patterns: &[&str]) -> AntMatchers
pub fn add_all(self, patterns: &[&str]) -> AntMatchers
Add multiple patterns
Sourcepub fn find_match(&self, path: &str) -> Option<&AntMatcher>
pub fn find_match(&self, path: &str) -> Option<&AntMatcher>
Get the first matching pattern, if any
Sourcepub fn find_all_matches(&self, path: &str) -> Vec<&AntMatcher>
pub fn find_all_matches(&self, path: &str) -> Vec<&AntMatcher>
Get all matching patterns
Trait Implementations§
Source§impl Clone for AntMatchers
impl Clone for AntMatchers
Source§fn clone(&self) -> AntMatchers
fn clone(&self) -> AntMatchers
Returns a duplicate 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 AntMatchers
impl Debug for AntMatchers
Source§impl Default for AntMatchers
impl Default for AntMatchers
Source§fn default() -> AntMatchers
fn default() -> AntMatchers
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AntMatchers
impl RefUnwindSafe for AntMatchers
impl Send for AntMatchers
impl Sync for AntMatchers
impl Unpin for AntMatchers
impl UnwindSafe for AntMatchers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more