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

Better stable bytes encode trait #93

Merged
merged 3 commits into from
Jan 24, 2021

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Jan 17, 2021

We finally found a way to declare the BytesEncode trait without making it too much complex and impossible to use in some situation where lifetimes are hard to work with, all of that by keeping the performances, and by only using stable Rust (no nightly feature).

The only downside is the fact that structs that implement the BytesEncoder trait will be forces to declare a lifetime if the encoded item (EItem) requires one, and I am not quite sure that we should always accept ?Sized EItem as they are impossible to be used with ranges bounds this is the reason why the Str encoder now accepts a &str and not an str.

It is blocked by #91 and closes #92.

@Kerollmops Kerollmops added the breaking A change that is breaking the semver label Jan 17, 2021
@Kerollmops Kerollmops force-pushed the better-stable-bytes-encode-trait branch from d7a6598 to 838cec1 Compare January 23, 2021 11:09
@Kerollmops Kerollmops force-pushed the better-stable-bytes-encode-trait branch from 838cec1 to 72c23d1 Compare January 23, 2021 11:12
@Kerollmops Kerollmops merged commit 7ad2356 into master Jan 24, 2021
@Kerollmops Kerollmops deleted the better-stable-bytes-encode-trait branch January 24, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A change that is breaking the semver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants