Struct melior_next::ir::named_attribute::NamedAttribute
source · pub struct NamedAttribute<'c> {
pub identifier: Identifier<'c>,
pub attribute: Attribute<'c>,
}
Expand description
Helper type. A named attribute, needed on all operations that use attributes.
Fields§
§identifier: Identifier<'c>
§attribute: Attribute<'c>
Implementations§
source§impl<'c> NamedAttribute<'c>
impl<'c> NamedAttribute<'c>
sourcepub fn new_parsed(
context: &'c Context,
name: &str,
attribute: &str
) -> Result<Self, Error>
pub fn new_parsed( context: &'c Context, name: &str, attribute: &str ) -> Result<Self, Error>
Creates a new named attribute, parsing the given attribute.
sourcepub fn new_parsed_vec(
context: &'c Context,
ident_attr_pairs: &[(&str, &str)]
) -> Result<Vec<Self>, Error>
pub fn new_parsed_vec( context: &'c Context, ident_attr_pairs: &[(&str, &str)] ) -> Result<Vec<Self>, Error>
Creates a new vector of named attribute from the given pairs.
pub const fn new( identifier: Identifier<'c>, attribute: Attribute<'c> ) -> Result<Self, Error>
Trait Implementations§
source§impl<'c> Clone for NamedAttribute<'c>
impl<'c> Clone for NamedAttribute<'c>
source§fn clone(&self) -> NamedAttribute<'c>
fn clone(&self) -> NamedAttribute<'c>
Returns a copy 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 more