pub struct SpecificityBuilder { /* private fields */ }Expand description
Builder for Specificity.
Implementations§
Source§impl SpecificityBuilder
impl SpecificityBuilder
Sourcepub fn a<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn a<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
The a component, which represents the number of ID selectors.
Sourcepub fn b<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn b<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
The b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.
Sourcepub fn c<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn c<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
The c component, which represents the number of type selectors and pseudo-elements.
Sourcepub fn build(&self) -> Result<Specificity, SpecificityBuilderError>
pub fn build(&self) -> Result<Specificity, SpecificityBuilderError>
Trait Implementations§
Source§impl Clone for SpecificityBuilder
impl Clone for SpecificityBuilder
Source§fn clone(&self) -> SpecificityBuilder
fn clone(&self) -> SpecificityBuilder
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 moreAuto Trait Implementations§
impl Freeze for SpecificityBuilder
impl RefUnwindSafe for SpecificityBuilder
impl Send for SpecificityBuilder
impl Sync for SpecificityBuilder
impl Unpin for SpecificityBuilder
impl UnsafeUnpin for SpecificityBuilder
impl UnwindSafe for SpecificityBuilder
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