pub trait AttributeHelper {
// Required methods
fn get_attributes(&self) -> Option<&Vec<Attribute>>;
fn get_mut_attributes(&mut self) -> Option<&mut Vec<Attribute>>;
// Provided methods
fn get_attribute(&self, path: &str) -> Option<&Attribute> { ... }
fn get_mut_attribute(&mut self, path: &str) -> Option<&mut Attribute> { ... }
fn contains_attribute(&self, path: &str) -> bool { ... }
fn remove_attribute(&mut self, path: &str) { ... }
fn replace_attributes(&mut self, new: Vec<Attribute>) -> Vec<Attribute> { ... }
fn insert_front(&mut self, front: Vec<Attribute>) { ... }
fn get_attribute_inner(&self, path: &str) -> Option<&TokenStream2> { ... }
fn get_attribute_value(&self, path: &str) -> Option<&Expr> { ... }
}Required Methods§
fn get_attributes(&self) -> Option<&Vec<Attribute>>
fn get_mut_attributes(&mut self) -> Option<&mut Vec<Attribute>>
Provided Methods§
fn get_attribute(&self, path: &str) -> Option<&Attribute>
fn get_mut_attribute(&mut self, path: &str) -> Option<&mut Attribute>
fn contains_attribute(&self, path: &str) -> bool
fn remove_attribute(&mut self, path: &str)
fn replace_attributes(&mut self, new: Vec<Attribute>) -> Vec<Attribute>
Sourcefn insert_front(&mut self, front: Vec<Attribute>)
fn insert_front(&mut self, front: Vec<Attribute>)
Expands this vector by attaching the given value to the front of this vector.
Sourcefn get_attribute_inner(&self, path: &str) -> Option<&TokenStream2>
fn get_attribute_inner(&self, path: &str) -> Option<&TokenStream2>
#[path(inner)]
Sourcefn get_attribute_value(&self, path: &str) -> Option<&Expr>
fn get_attribute_value(&self, path: &str) -> Option<&Expr>
#[path = value]