pub struct Specificity {
pub inline: u8,
pub id_count: u16,
pub class_count: u16,
pub type_count: u16,
}Expand description
Specificity vector $\mathbf{S} = (I, A, B, C)$:
- $I$: Inline style (1 for style attribute, 0 otherwise)
- $A$: Number of ID selectors
- $B$: Number of class selectors, attribute selectors, and pseudo-classes
- $C$: Number of type (tag) selectors and pseudo-elements
Fields§
§inline: u8§id_count: u16§class_count: u16§type_count: u16Implementations§
Trait Implementations§
Source§impl Add for Specificity
impl Add for Specificity
Source§impl AddAssign for Specificity
impl AddAssign for Specificity
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for Specificity
impl Clone for Specificity
impl Copy for Specificity
Source§impl Debug for Specificity
impl Debug for Specificity
Source§impl Default for Specificity
impl Default for Specificity
impl Eq for Specificity
Source§impl Hash for Specificity
impl Hash for Specificity
Source§impl Ord for Specificity
impl Ord for Specificity
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Specificity
impl PartialEq for Specificity
Source§impl PartialOrd for Specificity
impl PartialOrd for Specificity
impl StructuralPartialEq for Specificity
Auto Trait Implementations§
impl Forget for Specificity
impl Freeze for Specificity
impl Move 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