Skip to content

[Rust] Add derive Copy Clone traits for decoders #940

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

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

GreenPenguino
Copy link
Contributor

Add the Copy and Clone traits to message decoders.

The Rust API guidelines recommend eagerly implementing common traits. Since decoders and the ReadBuf are views without mutable access into a read-only buffer, there is no harm in copying a decoder (if so, the Rust borrow checker would prevent it from compiling).

@GreenPenguino GreenPenguino force-pushed the rust-decoder-copy-clone branch from 73b772a to 7082704 Compare May 17, 2023 08:05
@GreenPenguino GreenPenguino force-pushed the rust-decoder-copy-clone branch from 7082704 to b8a0247 Compare May 17, 2023 08:07
@vyazelenko vyazelenko merged commit b4ec154 into aeron-io:master Jun 8, 2023
@GreenPenguino GreenPenguino deleted the rust-decoder-copy-clone branch June 10, 2023 05:41
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