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

Port required_if_eq to the typed API #3808

Open
epage opened this issue Jun 9, 2022 · 1 comment
Open

Port required_if_eq to the typed API #3808

epage opened this issue Jun 9, 2022 · 1 comment
Labels
A-builder Area: Builder API C-enhancement Category: Raise on the bar on expectations S-waiting-on-design Status: Waiting on user-facing design to be resolved before implementing

Comments

@epage
Copy link
Member

epage commented Jun 9, 2022

With #3732, we now have a typed API. We should support typing in the rest of the API rather than relying on raw values.

@epage epage added C-enhancement Category: Raise on the bar on expectations A-builder Area: Builder API S-waiting-on-design Status: Waiting on user-facing design to be resolved before implementing labels Jun 9, 2022
@epage
Copy link
Member Author

epage commented Jun 9, 2022

This requires the ability to compare values.

I would suggest TypedValueParser gaining

fn partial_eq(&self) -> Option<bool> {
    None
}

We would then provide it for all of the built-in value parsers. The question is if we should make PartialEq a requirement for the FromStr blanket impl.

See also #3807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builder Area: Builder API C-enhancement Category: Raise on the bar on expectations S-waiting-on-design Status: Waiting on user-facing design to be resolved before implementing
Projects
None yet
Development

No branches or pull requests

1 participant