pub struct Selector(/* private fields */);
Expand description
A single css selector.
A selector does not contain ,
. If it does, it is a Selectors
,
where each of the parts separated by the comma is a Selector
.
Implementations§
source§impl Selector
impl Selector
sourcepub fn css_ok(self) -> Result<Self, BadSelector>
pub fn css_ok(self) -> Result<Self, BadSelector>
Validate that this selector is ok to use in css.
Selectors
can contain backref (&
), but those must be
resolved before using the Selectors
in css.
sourcepub fn has_trailing_combinator(&self) -> bool
pub fn has_trailing_combinator(&self) -> bool
Return true if this selector ends with a combinator
Trait Implementations§
source§impl PartialEq for Selector
impl PartialEq for Selector
source§impl PartialOrd for Selector
impl PartialOrd for Selector
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Selector
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnwindSafe for Selector
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