Trait style::dom_apis::SelectorQuery
[−]
[src]
pub trait SelectorQuery<E: TElement> { type Output; fn should_stop_after_first_match() -> bool; fn append_element(output: &mut Self::Output, element: E); fn is_empty(output: &Self::Output) -> bool; }
A selector query abstraction, in order to be generic over QuerySelector and QuerySelectorAll.
Associated Types
type Output
The output of the query.
Required Methods
fn should_stop_after_first_match() -> bool
Whether the query should stop after the first element has been matched.
fn append_element(output: &mut Self::Output, element: E)
Append an element matching after the first query.
fn is_empty(output: &Self::Output) -> bool
Returns true if the output is empty.
Implementors
impl<E: TElement> SelectorQuery<E> for QueryAll type Output = QuerySelectorAllResult<E>;
impl<E: TElement> SelectorQuery<E> for QueryFirst type Output = Option<E>;