Struct fungui::Query

source ·
pub struct Query<'a, E: Extension + 'a> { /* private fields */ }
Expand description

A query on a node that can be used to look up nodes in the same way that styles do.

The query! macro is a useful wrapper around this to match the syntax used in styles.

Implementations§

Converts an empty query into an owned one

Matches against the name of the current node if it is an element, fails otherwise.

Matches against a text node otherwise it fails

Matches against a property on the current node compares the value. Fails if the property is missing or the value doesn’t match.

Moves the matcher to a child node.

All other methods (name/text/property) will apply to the child after this

Returns a iterator over the possible matches

Returns a single match if any.

Alias for matches().next()

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.