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 Selectorpub 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) -> boolReturns true if the element matches this selector.
Trait Implementations
impl Debug for Selector[src]
impl Debug for Selectorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Selector[src]
impl Clone for Selectorfn clone(&self) -> Selector[src]
fn clone(&self) -> SelectorReturns 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