Expand description
Structural selector parser and matcher for annotation trees.
Re-exports§
pub use selector::Combinator;pub use selector::CompoundSelector;pub use selector::SelectorAst;
Modules§
- selector
- Structural selector parser.
Structs§
- Attr
Name - Attribute key in metadata maps.
- Predicate
- A predicate expression:
name,name=value,name^=value, etc. - TagName
- Annotation or code element tag name.
Enums§
- Predicate
Op - Comparison operator.
- Predicate
Value - Typed predicate value.
Traits§
- Matchable
- A matchable node — works for both annotations and code elements.
Functions§
- filter_
by_ selector - Filter an array of flat nodes by a selector AST. Returns indices into the input slice for matched nodes.
- filter_
by_ selector_ indexed - Filter nodes using parent indices for combinator matching.
parent_indices[i]is the index of node i’s parent innodes, orNone. - matches_
compound - Test if a single node matches a compound selector (tag + attributes).
- parse_
selector - Parse a CSS-like AQL selector string and return the AST.
Type Aliases§
- AttrOp
- Alias for
PredicateOp(backwards compatibility). - Attr
Predicate - Alias for
Predicate(backwards compatibility).