Struct scraper::selector::Selector [−][src]
Wrapper around CSS selectors.
Represents a "selector group", i.e. a comma-separated list of selectors.
Fields
selectors: SmallVec<[Selector<Simple>; 1]>
The CSS selectors.
Methods
impl Selector
[src]
impl Selector
pub fn parse<'t, 'i>(
selectors: &'i str
) -> Result<Self, ParseError<'i, SelectorParseErrorKind<'i>>>
[src]
pub fn parse<'t, 'i>(
selectors: &'i str
) -> Result<Self, ParseError<'i, SelectorParseErrorKind<'i>>>
Parses a CSS selector group.
pub fn matches(&self, element: &ElementRef) -> bool
[src]
pub fn matches(&self, element: &ElementRef) -> bool
Returns true if the element matches this selector.
Trait Implementations
impl Debug for Selector
[src]
impl Debug for Selector
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Selector
[src]
impl Clone for Selector
fn clone(&self) -> Selector
[src]
fn clone(&self) -> Selector
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Selector
[src]
impl PartialEq for Selector