We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right now, Flag has some issues that limit its usefulness:
Flag
Option
Deprecate darling::util::Flag in favor of... Word?
darling::util::Flag
Word
pub struct Word(Span); impl Spanned for Word {}
This would then be used in conjunction with Option:
#[derive(FromMeta)] pub struct Example { do_things: Option<Word> }
Note that unlike (), the implementation of FromMeta for Word would capture the span of the path:
()
FromMeta
#[example(do_things)] // ^^^^^^^^^
This enables useful attachment of diagnostics to the word.
bool
Toggle
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Right now,
Flag
has some issues that limit its usefulness:Flag
Option
handling is verbose #161 would need special logic to infer that aFlag
can be implicitly defaulted.Proposed API
Deprecate
darling::util::Flag
in favor of...Word
?This would then be used in conjunction with
Option
:Note that unlike
()
, the implementation ofFromMeta
forWord
would capture the span of the path:This enables useful attachment of diagnostics to the word.
Open Questions
Flag
in place and take the breaking change?bool
, maybe calledToggle
?The text was updated successfully, but these errors were encountered: