Hello guys, I have a problem with the Serialize trait and the following structure:
#[repr(C)]
#[derive(Default, AsBytes, FromZeroes, FromBytes, Debug, Serialize)]
struct MyMsg {
cmd : u32,
fpath : [u8,64],
}
The compiler complains that:
the trait
Serialize
is not implemented for[u8; 64]
How can I solve this issue ?
I noticed that if I declare
fpath : [u8;32]
the problem is no longer present, btw I need the member to have 32 elements.
One other solution is to use serde_bytes: serde_bytes - Rust (docs.rs) but I would prefer avoid adding another crate just for this if it's possible.
Thanks and have a nice day
F