Skip to content

Flag takes optional value #1354

Answered by CreepySkeleton
derekdreery asked this question in Q&A
Discussion options

You must be logged in to vote

This is supported via:

  • Check is_present, if false - no option were passed
  • Then check value_of
    • --example val will be mapped to Some(val)
    • --example will be mapped to None

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

@pksunkara
Comment options

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