pub trait TypedAttribute: Sized + Display {
const NAME: &'static str;
// Required method
fn parse(value: &str) -> Result<Self>;
// Provided method
fn to_attribute(&self) -> Attribute { ... }
}Expand description
An attribute with a value whose grammar this crate knows.
parse takes the text after a=<name>: and checks all of it; Display writes that text
back in the form the defining RFC gives.
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn to_attribute(&self) -> Attribute
fn to_attribute(&self) -> Attribute
The a= line this value makes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".