pub enum PathRule {
Prefix(String),
Regex(Regex),
Equals(String),
RegexPath(Regex),
}Variants§
Prefix(String)
Regex(Regex)
Equals(String)
RegexPath(Regex)
REGEX_PATH (sozu-proxy/sozu#1909): the same anchored regex as
PathRule::Regex, tested against the request path up to its first
? only (split_query), the Gateway API RegularExpression path
match. It shares Regex’s precedence class (PathRuleResult::Regex).
Implementations§
Source§impl PathRule
impl PathRule
pub fn matches(&self, path: &[u8]) -> PathRuleResult
pub fn from_config(rule: CommandPathRule) -> Option<Self>
Trait Implementations§
Source§impl PartialEq for PathRule
Regex carries no PartialEq, so the comparison is written by hand
and compares patterns by as_str(). Every variant must answer for
itself: without an Equals arm the catch-all made two identical
PathRule::Equals unequal — not even reflexive — and the router’s
bookkeeping (add_*_rule dedup, remove_*_rule eviction) silently
lost every --path-equals frontend, reporting success either way.
impl PartialEq for PathRule
Regex carries no PartialEq, so the comparison is written by hand
and compares patterns by as_str(). Every variant must answer for
itself: without an Equals arm the catch-all made two identical
PathRule::Equals unequal — not even reflexive — and the router’s
bookkeeping (add_*_rule dedup, remove_*_rule eviction) silently
lost every --path-equals frontend, reporting success either way.
Auto Trait Implementations§
impl Freeze for PathRule
impl RefUnwindSafe for PathRule
impl Send for PathRule
impl Sync for PathRule
impl Unpin for PathRule
impl UnsafeUnpin for PathRule
impl UnwindSafe for PathRule
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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