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

Implement Storable for Vec<T> where T: Storable #155

Open
ielashi opened this issue Nov 3, 2023 · 0 comments
Open

Implement Storable for Vec<T> where T: Storable #155

ielashi opened this issue Nov 3, 2023 · 0 comments

Comments

@ielashi
Copy link
Contributor

ielashi commented Nov 3, 2023

Currently we only implement Storable for Vec<u8>. Ideally, we would have a generic implementation that allows developers to put anything that implements Storable in a Vec.

We can't introduce this implementation at this point because:

  • Vec<u8> is special, in the sense that we don’t need to do any serializing/deserializing for the data - which makes its Storable implementation fast.
  • For all other types, we’d need to serialize/deserialize the elements in the Vec.

We'd need to wait for generic specializations in Rust to encode the logic above. The Vec<u8> special-case is quite important as it’s very often used.

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

1 participant