Trait cairo_lang_syntax::node::helpers::QueryAttrs   
source · pub trait QueryAttrs {
    // Provided methods
    fn query_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> Vec<Attribute> { ... }
    fn find_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> Option<Attribute> { ... }
    fn has_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> bool { ... }
}Expand description
Trait for querying attributes of AST items.
Provided Methods§
sourcefn query_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> Vec<Attribute>
 
fn query_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> Vec<Attribute>
Collect all attributes named exactly attr attached to this node.
sourcefn find_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> Option<Attribute>
 
fn find_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> Option<Attribute>
Find first attribute named exactly attr attached do this node.
sourcefn has_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> bool
 
fn has_attr(&self, db: &dyn SyntaxGroup, attr: &str) -> bool
Check if this node has an attribute named exactly attr.