pub type Selector<'i> = Selector<'i, Selectors>;
Expand description
A CSS selector, including a list of components.
Aliased Type§
struct Selector<'i>(/* private fields */);
Trait Implementations§
Source§impl<'i> ParseWithOptions<'i> for Selector<'i>
impl<'i> ParseWithOptions<'i> for Selector<'i>
Source§fn parse_with_options<'t>(
input: &mut Parser<'i, 't>,
options: &ParserOptions<'_, 'i>,
) -> Result<Self, ParseError<'i, ParserError<'i>>>
fn parse_with_options<'t>( input: &mut Parser<'i, 't>, options: &ParserOptions<'_, 'i>, ) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parse a value of this type with the given options.
Source§fn parse_string_with_options(
input: &'i str,
options: ParserOptions<'_, 'i>,
) -> Result<Self, ParseError<'i, ParserError<'i>>>
fn parse_string_with_options( input: &'i str, options: ParserOptions<'_, 'i>, ) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parse a value from a string with the given options.
Source§impl<'a, 'i> ToCss for Selector<'i>
impl<'a, 'i> ToCss for Selector<'i>
Source§fn to_css<W>(
&self,
dest: &mut Printer<'_, '_, '_, W>,
) -> Result<(), PrinterError>where
W: Write,
fn to_css<W>(
&self,
dest: &mut Printer<'_, '_, '_, W>,
) -> Result<(), PrinterError>where
W: Write,
Serialize
self
in CSS syntax, writing to dest
.Source§fn to_css_string(
&self,
options: PrinterOptions<'_>,
) -> Result<String, PrinterError>
fn to_css_string( &self, options: PrinterOptions<'_>, ) -> Result<String, PrinterError>
Serialize
self
in CSS syntax and return a string. Read moreSource§impl<'i, T: Visit<'i, T, V>, V: ?Sized + Visitor<'i, T>> Visit<'i, T, V> for Selector<'i>
Available on crate feature visitor
only.
impl<'i, T: Visit<'i, T, V>, V: ?Sized + Visitor<'i, T>> Visit<'i, T, V> for Selector<'i>
Available on crate feature
visitor
only.Source§const CHILD_TYPES: VisitTypes = VisitTypes::SELECTORS
const CHILD_TYPES: VisitTypes = VisitTypes::SELECTORS
The types of values contained within this value and its children.
This is used to skip branches that don’t have any values requested
by the Visitor.