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

Make OctetsFrom and OctetsInto have associated error types. #4

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

partim
Copy link
Member

@partim partim commented Aug 16, 2022

This PR allows implementations of OctetsFrom and OctetsInto to choose their own error type. The primary motivation is to allow types where the conversion can’t fail to use Infallible and provide variations of the conversion methods that then simply don’t fail.

Thus, the PR also prefixes the names of the primary methods of the two traits with try_ and adds new try_-less methods that are only available when conversion can’t fail.

@partim partim merged commit b28085f into main Aug 18, 2022
@partim partim deleted the octets-from-error-type branch August 18, 2022 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants