pub struct PathFilter { /* private fields */ }
Expand description
Path filter for conditional authentication
Implementations§
Source§impl PathFilter
impl PathFilter
Sourcepub fn skip_exact<P: Into<String>>(self, path: P) -> Self
pub fn skip_exact<P: Into<String>>(self, path: P) -> Self
Skip authentication for exact path
Sourcepub fn skip_prefix<P: Into<String>>(self, prefix: P) -> Self
pub fn skip_prefix<P: Into<String>>(self, prefix: P) -> Self
Skip authentication for paths with prefix
Sourcepub fn skip_suffix<P: Into<String>>(self, suffix: P) -> Self
pub fn skip_suffix<P: Into<String>>(self, suffix: P) -> Self
Skip authentication for paths with suffix
Sourcepub fn skip_regex<P: AsRef<str>>(self, pattern: P) -> Result<Self, Error>
pub fn skip_regex<P: AsRef<str>>(self, pattern: P) -> Result<Self, Error>
Skip authentication for paths matching regex pattern Requires “regex” feature
Sourcepub fn skip_paths<I, P>(self, paths: I) -> Self
pub fn skip_paths<I, P>(self, paths: I) -> Self
Skip authentication for multiple exact paths
Sourcepub fn skip_prefixes<I, P>(self, prefixes: I) -> Self
pub fn skip_prefixes<I, P>(self, prefixes: I) -> Self
Skip authentication for multiple prefixes
Sourcepub fn skip_suffixes<I, P>(self, suffixes: I) -> Self
pub fn skip_suffixes<I, P>(self, suffixes: I) -> Self
Skip authentication for multiple suffixes
Sourcepub fn should_skip(&self, path: &str) -> bool
pub fn should_skip(&self, path: &str) -> bool
Check if path should skip authentication
Sourcepub fn pattern_count(&self) -> usize
pub fn pattern_count(&self) -> usize
Get number of patterns
Sourcepub fn exact_paths(&self) -> Vec<&str>
pub fn exact_paths(&self) -> Vec<&str>
Get all exact match paths
Sourcepub fn remove_exact_path(self, path: &str) -> Self
pub fn remove_exact_path(self, path: &str) -> Self
Remove a specific exact path pattern
Trait Implementations§
Source§impl Clone for PathFilter
impl Clone for PathFilter
Source§fn clone(&self) -> PathFilter
fn clone(&self) -> PathFilter
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 PathFilter
impl Debug for PathFilter
Auto Trait Implementations§
impl Freeze for PathFilter
impl RefUnwindSafe for PathFilter
impl Send for PathFilter
impl Sync for PathFilter
impl Unpin for PathFilter
impl UnwindSafe for PathFilter
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