pub trait Attribute: Send + Sync {
// Required methods
fn verify(&self, value: &str) -> Result<(), String>;
fn name(&self) -> &CheetahString;
fn is_changeable(&self) -> bool;
}
Expand description
Trait representing an attribute with name and changeability properties.
This trait is the Rust equivalent of the Java abstract class Attribute. It defines common functionality for all attribute types.
Required Methods§
Sourcefn verify(&self, value: &str) -> Result<(), String>
fn verify(&self, value: &str) -> Result<(), String>
Verify that the provided string value is valid for this attribute. Implementations should validate according to their specific rules.
Sourcefn name(&self) -> &CheetahString
fn name(&self) -> &CheetahString
Get the name of this attribute.
Sourcefn is_changeable(&self) -> bool
fn is_changeable(&self) -> bool
Check if this attribute can be changed after creation.