pub struct RuleOverrideMatcher { /* private fields */ }Expand description
Matcher for per-directory overrides.
Overrides are applied from shallowest to deepest directory so child directories can refine parent behavior.
Implementations§
Source§impl RuleOverrideMatcher
impl RuleOverrideMatcher
Sourcepub fn compile(
specs: &[DirectoryRuleOverride],
) -> Result<Self, OverrideCompileError>
pub fn compile( specs: &[DirectoryRuleOverride], ) -> Result<Self, OverrideCompileError>
Compile raw directory overrides into a matcher.
Sourcepub fn resolve(&self, path: &str, rule_id: &str) -> ResolvedRuleOverride
pub fn resolve(&self, path: &str, rule_id: &str) -> ResolvedRuleOverride
Resolve the effective override for a specific path and rule id.
Trait Implementations§
Source§impl Clone for RuleOverrideMatcher
impl Clone for RuleOverrideMatcher
Source§fn clone(&self) -> RuleOverrideMatcher
fn clone(&self) -> RuleOverrideMatcher
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 RuleOverrideMatcher
impl Debug for RuleOverrideMatcher
Source§impl Default for RuleOverrideMatcher
impl Default for RuleOverrideMatcher
Source§fn default() -> RuleOverrideMatcher
fn default() -> RuleOverrideMatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuleOverrideMatcher
impl RefUnwindSafe for RuleOverrideMatcher
impl Send for RuleOverrideMatcher
impl Sync for RuleOverrideMatcher
impl Unpin for RuleOverrideMatcher
impl UnsafeUnpin for RuleOverrideMatcher
impl UnwindSafe for RuleOverrideMatcher
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