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.