#[macro_export]
macro_rules! convert_parsed_from_meta_list {
($ty:ty) => {
impl $crate::ConvertParsed for $ty {
type Type = $crate::__internal::syn::MetaList;
fn convert(
path_value: $crate::PathValue<Self::Type>,
) -> $crate::__internal::syn::Result<Self> {
match <Self as $crate::FromAttr>::from_meta_list(&path_value.value)? {
Some(a) => Ok(a),
None => {
let idents = <Self as $crate::AttributeIdent>::IDENTS
.iter()
.map(|ident| format!("`{}`", *ident))
.collect::<::std::vec::Vec<_>>()
.join(", ");
Err($crate::__internal::syn::Error::new(
path_value.path,
format!("expected idents: {}", idents),
))
}
}
}
}
};
}