Skip to content

Implement bincode Writer and Reader traits for Vec #519

Open
@petekubiak

Description

@petekubiak

I am working on a no_std embedded comms stack which talks to devices running C applications. The stack uses heapless::Vecs to handle the byte streams being sent and received, and I would like to use bincode to perform the conversion to / from Rust structures.

Right now, in order to do this I have to create a wrapper type around the heapless::Vec in order to implement bincode's Writer and Reader traits. It seems like this is a common enough pairing that it would make sense to have these traits implemented for heapless::Vec by default, or at least available through a feature, rather than having to re-implement for each new project working in this space.

I'm not sure whether it would make more sense for this implementation to live in the bincode crate or the heapless crate, so I've created an equivalent issue on the bincode repo. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions