pub trait Query {
// Required methods
fn get<M: Matcher>(&self, rules: &M) -> Option<HtmlElement>;
fn get_all<M: Matcher>(&self, rules: &M) -> Vec<HtmlElement>;
}Expand description
Allows selecting HtmlElements using Matchers.
By default implemented for Element where it selects it’s children matching provided pattern.
Required Methods§
Sourcefn get<M: Matcher>(&self, rules: &M) -> Option<HtmlElement>
fn get<M: Matcher>(&self, rules: &M) -> Option<HtmlElement>
Tries to get a unique component. Returns None on failure and HtmlElement on success.
§Panics:
If more than one element is found.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.