pub struct Specificity {
pub tool_kind: u8,
pub has_args: bool,
pub field_count: u8,
pub field_precision: u8,
}Expand description
Specificity of a pattern match, used for priority ordering.
Higher values = more specific = higher priority. Ordering: exact tool > glob tool > regex tool, with-args > without-args, more fields > fewer fields.
Fields§
§tool_kind: u8Tool name match precision: 3=exact, 2=glob, 1=regex.
has_args: boolWhether argument conditions are present.
field_count: u8Number of field conditions.
field_precision: u8Sum of per-field precision (exact=3, glob=2, regex=1 per field).
Trait Implementations§
Source§impl Clone for Specificity
impl Clone for Specificity
Source§fn clone(&self) -> Specificity
fn clone(&self) -> Specificity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Specificity
Source§impl Debug for Specificity
impl Debug for Specificity
impl Eq for Specificity
Source§impl Ord for Specificity
impl Ord for Specificity
Source§fn cmp(&self, other: &Specificity) -> Ordering
fn cmp(&self, other: &Specificity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Specificity
impl PartialEq for Specificity
Source§fn eq(&self, other: &Specificity) -> bool
fn eq(&self, other: &Specificity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Specificity
impl PartialOrd for Specificity
impl StructuralPartialEq for Specificity
Auto Trait Implementations§
impl Freeze for Specificity
impl RefUnwindSafe for Specificity
impl Send for Specificity
impl Sync for Specificity
impl Unpin for Specificity
impl UnsafeUnpin for Specificity
impl UnwindSafe for Specificity
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