pub struct Parser;
Expand description
css parser
Trait Implementations§
Source§impl<'i> Parser<'i> for Parser
impl<'i> Parser<'i> for Parser
type Impl = Simple
type Error = RuleParseErrorKind<'i>
Source§fn parse_slotted(&self) -> bool
fn parse_slotted(&self) -> bool
Whether to parse the
::slotted()
pseudo-element.Source§fn parse_part(&self) -> bool
fn parse_part(&self) -> bool
Whether to parse the
::part()
pseudo-element.Source§fn parse_host(&self) -> bool
fn parse_host(&self) -> bool
Whether to parse the
:host
pseudo-class.Source§fn parse_non_ts_pseudo_class(
&self,
location: SourceLocation,
name: CowRcStr<'i>,
) -> Result<<Self::Impl as SelectorImpl>::NonTSPseudoClass, ParseError<'i, Self::Error>>
fn parse_non_ts_pseudo_class( &self, location: SourceLocation, name: CowRcStr<'i>, ) -> Result<<Self::Impl as SelectorImpl>::NonTSPseudoClass, ParseError<'i, Self::Error>>
This function can return an “Err” pseudo-element in order to support CSS2.1
pseudo-elements.
fn parse_non_ts_functional_pseudo_class<'t>( &self, name: CowRcStr<'i>, arguments: &mut Parser<'i, 't>, ) -> Result<<Self::Impl as SelectorImpl>::NonTSPseudoClass, ParseError<'i, Self::Error>>
fn parse_pseudo_element( &self, location: SourceLocation, name: CowRcStr<'i>, ) -> Result<<Self::Impl as SelectorImpl>::PseudoElement, ParseError<'i, Self::Error>>
fn parse_functional_pseudo_element<'t>( &self, name: CowRcStr<'i>, arguments: &mut Parser<'i, 't>, ) -> Result<<Self::Impl as SelectorImpl>::PseudoElement, ParseError<'i, Self::Error>>
fn default_namespace( &self, ) -> Option<<Self::Impl as SelectorImpl>::NamespaceUrl>
fn namespace_for_prefix( &self, _prefix: &<Self::Impl as SelectorImpl>::NamespacePrefix, ) -> Option<<Self::Impl as SelectorImpl>::NamespaceUrl>
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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> 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