pub struct ComplexSelector {
pub parts: Vec<SelectorPart>,
}Expand description
A complex CSS selector composed of multiple selector parts.
Selector parts are stored from right to left to match the order used during selector matching.
Example:
A Bis stored as:
[
B (Descendant),
A (None)
]Fields§
§parts: Vec<SelectorPart>Implementations§
Source§impl ComplexSelector
impl ComplexSelector
pub fn matches(&self, chain: &[ElementInfo]) -> bool
pub fn specificity(&self) -> (u32, u32, u32)
Trait Implementations§
Source§impl Clone for ComplexSelector
impl Clone for ComplexSelector
Source§fn clone(&self) -> ComplexSelector
fn clone(&self) -> ComplexSelector
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 ComplexSelector
impl Debug for ComplexSelector
Source§impl Hash for ComplexSelector
impl Hash for ComplexSelector
Source§impl PartialEq for ComplexSelector
impl PartialEq for ComplexSelector
impl Eq for ComplexSelector
impl StructuralPartialEq for ComplexSelector
Auto Trait Implementations§
impl Freeze for ComplexSelector
impl RefUnwindSafe for ComplexSelector
impl Send for ComplexSelector
impl Sync for ComplexSelector
impl Unpin for ComplexSelector
impl UnwindSafe for ComplexSelector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more