Let's say I have the following:
#[derive(Debug, FromField)]
#[darling(attributes(my_attribute))]
struct StructFieldReceiver {
ident: Option<syn::Ident>,
vis: syn::Visibility,
ty: syn::Type,
name: String,
sql_type: SqlType,
}
#[derive(Debug, FromMeta)]
#[darling(rename_all = "lowercase")]
enum SqlType {
// omitted variants
BigInt, Int, SmallInt, TinyInt, Bit,
Float(Option<u8>),
Decimal{
p: Option<u8>,
s: Option<u8>
},
// omitted variants
}
I can use the variants without type with #[my_attribute(name = "name", sql_type = "int")], but I don't know the correct syntax for specifying the Float or Decimal variants. Could you please point me in the right direction?
Let's say I have the following:
I can use the variants without type with
#[my_attribute(name = "name", sql_type = "int")], but I don't know the correct syntax for specifying the Float or Decimal variants. Could you please point me in the right direction?