Skip to content

arg_enum with builder pattern #1881

Answered by pksunkara
feuerste asked this question in Q&A
Discussion options

You must be logged in to vote

Once you define #[derive(Clap)] on the enum, you will have YourEnum::VARIANTS and YourEnum::from_str(input: &str, case_insensitive: bool) -> Result<Self, String> available. You can use them.

Replies: 4 comments

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
0 replies
Answer selected by feuerste
Comment options

You must be logged in to vote
0 replies
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