/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use darling::{FromDeriveInput, FromField}; use proc_macro2::{Span, TokenStream}; use quote::{quote, TokenStreamExt}; use syn::{self, parse_quote, DeriveInput, Field, Ident, WherePredicate}; use synstructure::{self, BindStyle, BindingInfo, VariantInfo};
pub(crate) fn parse_input_attrs<A>(input: &DeriveInput) -> A where
A: FromDeriveInput,
{ match A::from_derive_input(input) {
Ok(attrs) => attrs,
Err(e) => panic!("failed to parse input attributes: {}", e),
}
}
pub(crate) fn parse_field_attrs<A>(field: &Field) -> A where
A: FromField,
{ match A::from_field(field) {
Ok(attrs) => attrs,
Err(e) => panic!("failed to parse field attributes: {}", e),
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.