style::dom_apis

Trait SelectorQuery

Source
pub trait SelectorQuery<E: TElement> {
    type Output;

    // Required methods
    fn should_stop_after_first_match() -> bool;
    fn append_element(output: &mut Self::Output, element: E);
    fn is_empty(output: &Self::Output) -> bool;
}
Expand description

A selector query abstraction, in order to be generic over QuerySelector and QuerySelectorAll.

Required Associated Types§

Source

type Output

The output of the query.

Required Methods§

Source

fn should_stop_after_first_match() -> bool

Whether the query should stop after the first element has been matched.

Source

fn append_element(output: &mut Self::Output, element: E)

Append an element matching after the first query.

Source

fn is_empty(output: &Self::Output) -> bool

Returns true if the output is empty.

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.

Implementors§