pub trait TryFromAttributeswhere
Self: Sized,{
// Required methods
fn attr_name() -> &'static str;
fn try_from_attributes(attrs: &[Attribute]) -> Result<Option<Self>>;
// Provided method
fn from_attributes(attrs: &[Attribute]) -> Result<Self> { ... }
}
Required Methods§
fn attr_name() -> &'static str
fn try_from_attributes(attrs: &[Attribute]) -> Result<Option<Self>>
Provided Methods§
fn from_attributes(attrs: &[Attribute]) -> Result<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.