Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

breaking change: improve as_/is_ helpers #527

Merged
merged 10 commits into from
Jun 22, 2021
Merged

breaking change: improve as_/is_ helpers #527

merged 10 commits into from
Jun 22, 2021

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Jun 22, 2021

Issue #, if available:

Description of changes:

  • *breaking: *as_ helpers for unions now return Result to clearly indicate what the actual value was
  • Union variants now implement TryFrom for the parent union
  • Error types now generate is_ helpers improving ergonomics when matching specific errors

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

rcoh added 2 commits June 22, 2021 10:40
- `as_` helpers for unions now return `Result` to clearly indicate what the actual value was
- Union variants now implement `TryFrom` for the parent union
- Error types now generate `is_` helpers
@rcoh rcoh requested a review from jdisanti June 22, 2021 17:42
@rcoh rcoh linked an issue Jun 22, 2021 that may be closed by this pull request
@rcoh rcoh merged commit 206ef91 into main Jun 22, 2021
@rcoh rcoh deleted the as-variants branch June 22, 2021 20:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add is_xyz / as_xyz to combined error shapes
2 participants