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

Deal with RawBytes ambiguity #1502

Open
Stebalien opened this issue Jan 16, 2024 · 3 comments
Open

Deal with RawBytes ambiguity #1502

Stebalien opened this issue Jan 16, 2024 · 3 comments
Labels

Comments

@Stebalien
Copy link
Member

RawBytes was intended for "cbor-serialized" data but we use it for other byte vectors because it's convenient. We should either:

  1. Update the documentation to reflect that RawBytes has no opinions on the serialization of the data.
  2. Introduce a better type for "byte vec". We already have one BytesDe, but the name isn't great and we don't use it frequently.
@anorth
Copy link
Member

anorth commented Jan 16, 2024

Thanks. Pending arguments about why it should be opinionated about format (preferably backed up by enforcement) I prefer option (1). I have forgotten it once was opinionated since at least the time we switched to Rust.

@Stebalien
Copy link
Member Author

Yeah, that seems reasonable.

@Stebalien
Copy link
Member Author

Although... maybe introduce a RawCbor type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants