Struct kuchiki::Selectors
[−]
[src]
pub struct Selectors(pub Vec<Selector>);
A pre-compiled list of CSS Selectors.
Methods
impl Selectors
[src]
pub fn compile(s: &str) -> Result<Selectors, ()>
[src]
Compile a list of selectors. This may fail on syntax errors or unsupported selectors.
pub fn matches(&self, element: &NodeDataRef<ElementData>) -> bool
[src]
Returns whether the given element matches this list of selectors.
ⓘImportant traits for Select<I, S>pub fn filter<I>(&self, iter: I) -> Select<I, &Selectors> where
I: Iterator<Item = NodeDataRef<ElementData>>,
[src]
ⓘImportant traits for Select<I, S>
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, ()>
[src]
Parses a string s
to return a value of this type. Read more
impl Display for Selectors
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more