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 Serialize for [T; L] #2518

Closed
DasLixou opened this issue Jul 21, 2023 · 3 comments
Closed

Implement Serialize for [T; L] #2518

DasLixou opened this issue Jul 21, 2023 · 3 comments

Comments

@DasLixou
Copy link

implement Serialize for a x-long array.
something like impl<T: Serialize, const L: usize> Serialize for [T; L] { .. }
with that its possible to do:

#[derive(Serialize)]
pub struct MyStruct<const R: usize> {
    pub rows: [PosSpan; R],
}
@Max-Meldrum
Copy link

@uuhan
Copy link

uuhan commented Jan 23, 2024

See https://github.com/est31/serde-big-array

If serde is used in bindgen, it is not easy to add serde-big-array to long array field.

@hrxi
Copy link

hrxi commented Jan 27, 2024

Looks like a duplicate of #1937.

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

No branches or pull requests

5 participants