Add documentation to Meta::from_attribute

This commit is contained in:
Jonas Platte 2019-07-25 23:59:35 +02:00
parent 53cf6c562d
commit a89f69e4f3

View File

@ -15,6 +15,8 @@ pub enum Meta {
}
impl Meta {
/// Check if the given attribute is a ruma_api attribute. If it is, parse it, if not, return
/// it unchanged. Panics if the argument is an invalid ruma_api attribute.
pub fn from_attribute(attr: syn::Attribute) -> Result<Self, syn::Attribute> {
match &attr.path {
syn::Path {