fn parse_field_attr_args(attr: &syn::Attribute, args: &mut FieldAttrArgs) -> Result<(), Error> {
    return match attr.parse_meta()? {
        syn::Meta::List(syn::MetaList { ref nested, .. }) => {
            for nested_meta in nested {
                match nested_meta {
                    syn::NestedMeta::Meta(syn::Meta::Path(ref path)) => {
                        if path.is_ident("skip") {
                            args.skip = true;
                        } else {
                            return Err(Error::new_spanned(
                                path,
                                "unrecognized attribute argument",
                            ));
                        }
                    }
                    _ => {
                        return Err(Error::new_spanned(
                            nested_meta,
                            "unrecognized attribute argument",
                        ))
                    }
                }
            }
            Ok(())
        }
        meta @ _ => Err(Error::new_spanned(meta, "unrecognized attribute arguments")),
    };
}
/// Given an `inspect` field attribute, parse its arguments. Errors out if arguments are
/// malformed.
Given an `inspect` field attribute, parse its arguments. Errors out if arguments are
malformed.
Given an ` inspect ` field attribute parse its arguments . Errors out if arguments are malformed .
fn parse_field_attr_args(attr: &syn::Attribute, args: &mut FieldAttrArgs) -> Result<(), Error> {
    return match attr.parse_meta()? {
        syn::Meta::List(syn::MetaList { ref nested, .. }) => {
            for nested_meta in nested {
                match nested_meta {
                    syn::NestedMeta::Meta(syn::Meta::Path(ref path)) => {
                        if path.is_ident("skip") {
                            args.skip = true;
                        } else {
                            return Err(Error::new_spanned(
                                path,
                                "unrecognized attribute argument",
                            ));
                        }
                    }
                    _ => {
                        return Err(Error::new_spanned(
                            nested_meta,
                            "unrecognized attribute argument",
                        ))
                    }
                }
            }
            Ok(())
        }
        meta @ _ => Err(Error::new_spanned(meta, "unrecognized attribute arguments")),
    };
}
fn parse_field_attr_args ( attr : & syn :: Attribute , args : & mut FieldAttrArgs ) -> Result < ( ) , Error > { return match attr . parse_meta ( ) ? { syn :: Meta :: List ( syn :: MetaList { ref nested , .. } ) => { for nested_meta in nested { match nested_meta { syn :: NestedMeta :: Meta ( syn :: Meta :: Path ( ref path ) ) => { if path . is_ident ( " " ) { args . skip = true ; } else { return Err ( Error :: new_spanned ( path , " " , ) ) ; } } _ => { return Err ( Error :: new_spanned ( nested_meta , " " , ) ) } } } Ok ( ( ) ) } meta @ _ => Err ( Error :: new_spanned ( meta , " " ) ) , } ; }
Given an `inspect` field attribute, parse its arguments.
Given an ` inspect ` field attribute parse its arguments .
attr
&syn::Attribute
args
&mut FieldAttrArgs
attr
&syn::Attribute
args
&mut FieldAttrArgs