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

Bytes: add support for serializing by extending a Vec<u8, N> #12

Closed
sosthene-nitrokey opened this issue Oct 2, 2024 · 2 comments
Closed

Comments

@sosthene-nitrokey
Copy link
Contributor

sosthene-nitrokey commented Oct 2, 2024

I would do this by using a trait implemented for &mut [u8], heapless_bytes_v0_3::Bytes<N>, heapless_bytes_v0_4::Bytes<N>, heapless_v0_7::Vec<u8, N>, heapless_v0_8::Vec<u8, N>

For example this would allow the CTAP apps to serialize directly extending the response buffer.

@sosthene-nitrokey
Copy link
Contributor Author

There is actually already the Writer trait for that, but it's not implemented for heapless types or exposed in a simple function.

@robin-nitrokey
Copy link
Member

Implemented in #13.

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

2 participants