pub struct Attributes(pub Vec<Attribute>);
Tuple Fields§
§0: Vec<Attribute>
Implementations§
Source§impl Attributes
impl Attributes
pub fn get_attributes(&self, name: &str) -> Self
pub const fn is_empty(&self) -> bool
pub fn has_attribute(&self, name: &str) -> bool
pub fn get_attribute(&self, name: &str) -> Option<&Attribute>
pub fn get_fn_arg_by_name( &self, attr_name: &str, arg_fn_name: &str, ) -> Option<&AttributeArg>
pub fn get_fn_arg_sub_args( &self, attr_name: &str, arg_fn_name: &str, ) -> Option<&Vec<AttributeArg>>
pub fn get_arg(&self, name: &str, arg_index: usize) -> Option<AttributeArg>
pub fn get_value(&self, name: &str, arg_index: usize) -> Option<AttributeValue>
pub fn get_int(&self, name: &str, arg_index: usize) -> Option<i32>
pub fn get_int_from_fn_arg( &self, attr_name: &str, arg_fn_name: &str, sub_arg_index: usize, ) -> Option<i32>
pub fn get_string_from_fn_arg( &self, attr_name: &str, arg_fn_name: &str, sub_arg_index: usize, ) -> Option<&String>
pub fn get_string(&self, name: &str, arg_index: usize) -> Option<String>
pub fn get_args(&self, name: &str) -> Option<Vec<AttributeArg>>
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
Source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more