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

Create separate derives for SequenceEncode/SequenceDecode #1705

Closed
npmccallum opened this issue Mar 11, 2025 · 4 comments
Closed

Create separate derives for SequenceEncode/SequenceDecode #1705

npmccallum opened this issue Mar 11, 2025 · 4 comments
Milestone

Comments

@npmccallum
Copy link
Contributor

Currently, we can derive(Sequence). But this implies ownership of values. Where *Ref types are used, derive(Sequence) cannot be. Perhaps we could split Sequence into SequenceEncode/SequenceDecode? I'm open to other solutions.

@tarcieri
Copy link
Member

What might make sense is to split the Sequence custom derive apart so you can independently derive the DecodeValue and EncodeValue traits

@npmccallum
Copy link
Contributor Author

Something would also need to derive FixedTag. I think that's why Sequence was done as a single derive.

@tarcieri
Copy link
Member

FixedTag impls are trivial to write by hand

@baloo
Copy link
Member

baloo commented Mar 24, 2025

Should be fixed by #1722 (if not my bad, please re-open)

@baloo baloo closed this as completed Mar 24, 2025
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

No branches or pull requests

3 participants