Skip to content

How to use Option<Args> with #[command(flatten)]? #5687

Answered by epage
LazyMechanic asked this question in Q&A
Discussion options

You must be logged in to vote

We don't have a built-in concept of "this entire ArgGroup is required". For now, you could specify that each argument requires the other arguments. You'll also need to set required = true because OptArgs doesn't know its being used in this way.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LazyMechanic
Comment options

@epage
Comment options

Answer selected by LazyMechanic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants