pub trait AttributePropertyComponentwhere
Self: Sized,{
const KEYWORD: &'static str;
}
Expand description
Trait for properties of an attribute component that can be identified by a keyword.
The AttributePropertyComponent
trait defines the interface for attribute properties
that can be identified by a specific keyword. Implementors of this trait are required
to define a constant KEYWORD
that identifies the type of the property.
This trait is useful in scenarios where attributes may have multiple properties that need to be parsed and handled separately. By defining a unique keyword for each property, the parsing logic can accurately identify and process each property.
§Example
use macro_tools::AttributePropertyComponent;
struct MyProperty;
impl AttributePropertyComponent for MyProperty
{
const KEYWORD : &'static str = "my_property";
}
Required Associated Constants§
Object Safety§
This trait is not object safe.