You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the documentation here, it suggests that the type for the fields field is Option<darling::ast::Fields<__>>.
Having just tried to implement this (using darling v0.14.1), I get an error stating that the true type is actually darling::ast::Fields<_>.
Testing it on a plain enum without tuple/field variants, fields returns an empty vector. I think it would be better if the behaviour was as per the documentation, and that non-tuple/field variants return None and others return Some(*at least one field*).
I also think it would be clear in the docs to mention that darling::ast::Fields<_> something which implements FromField e.g. darling::ast::Fields<T: impl darling::FromField> just to save a bit of digging around in the documentation/chasing error messages.
The text was updated successfully, but these errors were encountered:
Looking at the documentation here, it suggests that the type for the
fields
field isOption<darling::ast::Fields<__>>
.Having just tried to implement this (using
darling
v0.14.1), I get an error stating that the true type is actuallydarling::ast::Fields<_>
.Testing it on a plain enum without tuple/field variants,
fields
returns an empty vector. I think it would be better if the behaviour was as per the documentation, and that non-tuple/field variants returnNone
and others returnSome(*at least one field*)
.I also think it would be clear in the docs to mention that
darling::ast::Fields<_>
something which implements FromField e.g.darling::ast::Fields<T: impl darling::FromField>
just to save a bit of digging around in the documentation/chasing error messages.The text was updated successfully, but these errors were encountered: