pub struct Specificity {
pub ids: u32,
pub classes: u32,
pub elements: u32,
}Expand description
CSS specificity value (a, b, c) where:
- a = number of ID selectors
- b = number of class selectors, attribute selectors, pseudo-classes
- c = number of type selectors, pseudo-elements
Fields§
§ids: u32Number of ID selectors (#id).
classes: u32Number of class/attribute/pseudo-class selectors.
elements: u32Number of type/pseudo-element selectors.
Implementations§
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 · 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 Specificity
impl Debug for Specificity
Source§impl Default for Specificity
impl Default for Specificity
Source§fn default() -> Specificity
fn default() -> Specificity
Returns the “default value” for a type. Read more
Source§impl Display for Specificity
impl Display 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 · 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§impl PartialOrd for Specificity
impl PartialOrd for Specificity
impl Copy for Specificity
impl Eq 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 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