Skip to content

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

Open
@ielashi

Description

@ielashi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions