Struct kuchiki::Selectors
[−]
[src]
pub struct Selectors(pub Vec<Selector>);
A pre-compiled list of CSS Selectors.
Methods
impl Selectors
[src]
fn compile(s: &str) -> Result<Selectors, ()>
Compile a list of selectors. This may fail on syntax errors or unsupported selectors.
fn matches(&self, element: &NodeDataRef<ElementData>) -> bool
Returns whether the given element matches this list of selectors.
fn filter<I>(&self, iter: I) -> Select<I, &Selectors> where
I: Iterator<Item = NodeDataRef<ElementData>>,
I: Iterator<Item = NodeDataRef<ElementData>>,
Filter an element iterator, yielding those matching this list of selectors.
Trait Implementations
impl FromStr for Selectors
[src]
type Err = ()
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Selectors, ()>
Parses a string s
to return a value of this type. Read more