pub trait AttributeExt {
fn is_repr_attribute(&self) -> bool;
fn filter_repr(&self) -> Option<&syn::Attribute>;
}
impl AttributeExt for syn::Attribute {
fn is_repr_attribute(&self) -> bool {
self.path().is_ident("repr")
}
fn filter_repr(&self) -> Option<&syn::Attribute> {
if self.is_repr_attribute() {
return Some(self);
}
None
}
}