Struct selectors::parser::SelectorList
source · pub struct SelectorList<Impl: SelectorImpl>(pub SmallVec<[Selector<Impl>; 1]>);
Tuple Fields§
§0: SmallVec<[Selector<Impl>; 1]>
Implementations§
source§impl<Impl: SelectorImpl> SelectorList<Impl>
impl<Impl: SelectorImpl> SelectorList<Impl>
sourcepub fn parse<'i, 't, P>(
parser: &P,
input: &mut CssParser<'i, 't>,
parse_relative: ParseRelative
) -> Result<Self, ParseError<'i, P::Error>>where
P: Parser<'i, Impl = Impl>,
pub fn parse<'i, 't, P>( parser: &P, input: &mut CssParser<'i, 't>, parse_relative: ParseRelative ) -> Result<Self, ParseError<'i, P::Error>>where P: Parser<'i, Impl = Impl>,
Parse a comma-separated list of Selectors. https://drafts.csswg.org/selectors/#grouping
Return the Selectors or Err if there is an invalid selector.
sourcepub fn replace_parent_selector(&self, parent: &[Selector<Impl>]) -> Self
pub fn replace_parent_selector(&self, parent: &[Selector<Impl>]) -> Self
Replaces the parent selector in all the items of the selector list.
Trait Implementations§
source§impl<Impl: Clone + SelectorImpl> Clone for SelectorList<Impl>
impl<Impl: Clone + SelectorImpl> Clone for SelectorList<Impl>
source§fn clone(&self) -> SelectorList<Impl>
fn clone(&self) -> SelectorList<Impl>
Returns a copy 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<Impl: Debug + SelectorImpl> Debug for SelectorList<Impl>
impl<Impl: Debug + SelectorImpl> Debug for SelectorList<Impl>
source§impl<Impl: PartialEq + SelectorImpl> PartialEq<SelectorList<Impl>> for SelectorList<Impl>
impl<Impl: PartialEq + SelectorImpl> PartialEq<SelectorList<Impl>> for SelectorList<Impl>
source§fn eq(&self, other: &SelectorList<Impl>) -> bool
fn eq(&self, other: &SelectorList<Impl>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Impl: SelectorImpl> ToCss for SelectorList<Impl>
impl<Impl: SelectorImpl> ToCss for SelectorList<Impl>
impl<Impl: Eq + SelectorImpl> Eq for SelectorList<Impl>
impl<Impl: SelectorImpl> StructuralEq for SelectorList<Impl>
impl<Impl: SelectorImpl> StructuralPartialEq for SelectorList<Impl>
Auto Trait Implementations§
impl<Impl> RefUnwindSafe for SelectorList<Impl>where <Impl as SelectorImpl>::AttrValue: RefUnwindSafe, <Impl as SelectorImpl>::Identifier: RefUnwindSafe, <Impl as SelectorImpl>::LocalName: RefUnwindSafe, <Impl as SelectorImpl>::NamespacePrefix: RefUnwindSafe, <Impl as SelectorImpl>::NamespaceUrl: RefUnwindSafe, <Impl as SelectorImpl>::NonTSPseudoClass: RefUnwindSafe, <Impl as SelectorImpl>::PseudoElement: RefUnwindSafe,
impl<Impl> Send for SelectorList<Impl>where <Impl as SelectorImpl>::AttrValue: Send + Sync, <Impl as SelectorImpl>::Identifier: Send + Sync, <Impl as SelectorImpl>::LocalName: Send + Sync, <Impl as SelectorImpl>::NamespacePrefix: Send + Sync, <Impl as SelectorImpl>::NamespaceUrl: Send + Sync, <Impl as SelectorImpl>::NonTSPseudoClass: Send + Sync, <Impl as SelectorImpl>::PseudoElement: Send + Sync,
impl<Impl> Sync for SelectorList<Impl>where <Impl as SelectorImpl>::AttrValue: Send + Sync, <Impl as SelectorImpl>::Identifier: Send + Sync, <Impl as SelectorImpl>::LocalName: Send + Sync, <Impl as SelectorImpl>::NamespacePrefix: Send + Sync, <Impl as SelectorImpl>::NamespaceUrl: Send + Sync, <Impl as SelectorImpl>::NonTSPseudoClass: Send + Sync, <Impl as SelectorImpl>::PseudoElement: Send + Sync,
impl<Impl> Unpin for SelectorList<Impl>where <Impl as SelectorImpl>::AttrValue: Unpin, <Impl as SelectorImpl>::Identifier: Unpin, <Impl as SelectorImpl>::LocalName: Unpin, <Impl as SelectorImpl>::NamespacePrefix: Unpin, <Impl as SelectorImpl>::NamespaceUrl: Unpin, <Impl as SelectorImpl>::NonTSPseudoClass: Unpin, <Impl as SelectorImpl>::PseudoElement: Unpin,
impl<Impl> UnwindSafe for SelectorList<Impl>where <Impl as SelectorImpl>::AttrValue: UnwindSafe + RefUnwindSafe, <Impl as SelectorImpl>::Identifier: UnwindSafe + RefUnwindSafe, <Impl as SelectorImpl>::LocalName: UnwindSafe + RefUnwindSafe, <Impl as SelectorImpl>::NamespacePrefix: UnwindSafe + RefUnwindSafe, <Impl as SelectorImpl>::NamespaceUrl: UnwindSafe + RefUnwindSafe, <Impl as SelectorImpl>::NonTSPseudoClass: UnwindSafe + RefUnwindSafe, <Impl as SelectorImpl>::PseudoElement: UnwindSafe + RefUnwindSafe,
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