Skip to content
New issue

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

docs: Clarify value parser #4244

Merged
merged 2 commits into from Sep 21, 2022
Merged

docs: Clarify value parser #4244

merged 2 commits into from Sep 21, 2022

Commits on Sep 21, 2022

  1. docs(ref): Remove dead example

    This was missed in the migration to the reference being on docs.rs.  Not
    feeling its worth finding a way to integrate it into the new structure.
    epage committed Sep 21, 2022
    Copy the full SHA
    99dfe74 View commit details
    Browse the repository at this point in the history
  2. docs: Clarify value parser

    Things that tripped up a user
    - Derive reference was misunderstood to say that the only alternative to
      the built-in value parser behavior was to implement
      `ValueParserFactory`
      - We now delegate to `value_parser!`s docs any talk of integrating
        into it (it should have been a subbullet of "not present" anyways)
    - `value_parser!` relies too much on the example to demonstrate behavior
      when the user will likely make the determination of whether its
      relevant before then
      - We are now more upfront what type mappings are supported
    - Too many steps to find all information
      - For example, a user needs to look at `TypedValueParser`
        implementations, `ValueParserFactory` implementations, and `From<T>
        for ValueParser` implementations to understand what all can be used
      - We are now more upfront with a lot of this information at the entry
        points the user is most likely to look at
    
    In addition, I did an audit of the docs to make sure they were updated
    for us only supporting the new behavior and all of the new APIs.
    
    See https://www.reddit.com/r/rust/comments/xjlie4/preannouncing_clap_40_a_rust_cli_argument_parser/ip9kzf1/
    epage committed Sep 21, 2022
    Copy the full SHA
    2bbb81f View commit details
    Browse the repository at this point in the history