
```no_run
#[derive(Debug, Clone, Bpaf)]
pub enum Format {
    /// Produce output in HTML format
    Html,
    /// Produce output in Markdown format
    Markdown,
    /// Produce output in manpage format
    Manpage,
}

#[derive(Debug, Clone, Bpaf)]
#[bpaf(options)]
pub struct Options {
    /// File to process
    input: String,
    #[bpaf(external(format))]
    format: Format,
}

fn main() {
    println!("{:?}", options().run())
}
```


Output

Help message lists all possible options

$ app --help

Usage: app --input=ARG (--html | --markdown | --manpage)

Available options:

    --input=ARG

File to process

    --html

Produce output in HTML format

    --markdown

Produce output in Markdown format

    --manpage

Produce output in manpage format

-h, --help

Prints help information

Parser accepts one and only one value from enum in this example

$ app --input Cargo.toml --html
Options { input: "Cargo.toml", format: Html }

$ app --input Cargo.toml --manpage
Options { input: "Cargo.toml", format: Manpage }

$ app --input hello
Error: expected --html, --markdown, or more, pass --help for usage information

