You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 30, 2023. It is now read-only.
I'm trying to serialize a struct into a [u8; size] array that has a member that's also a struct. I've tried a lot of variations but nothing works. I this supposed to work? The below code gives this error:
error[E0277]: the trait bound `typic::private::bytelevel::slot::bytes::Bytes<typic::private::highlevel::field::Public, typic::private::bytelevel::slot::bytes::kind::Initialized, typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>>: typic::private::transmute::from_layout::bytes_to::BytesFromBytes<typic::private::bytelevel::slot::bytes::Bytes<typic::private::highlevel::field::Private, typic::private::bytelevel::slot::bytes::kind::Uninitialized, typenum::uint::UTerm>, typic::private::transmute::Variant, typic::private::transmute::Enforced, typic::private::transmute::AlwaysValid>` is not satisfied
--> src/main.rs:26:9
|
26 | dhe.transmute_into()
| ^^^^^^^^^^^^^^ the trait `typic::private::transmute::from_layout::bytes_to::BytesFromBytes<typic::private::bytelevel::slot::bytes::Bytes<typic::private::highlevel::field::Private, typic::private::bytelevel::slot::bytes::kind::Uninitialized, typenum::uint::UTerm>, typic::private::transmute::Variant, typic::private::transmute::Enforced, typic::private::transmute::AlwaysValid>` is not implemented for `typic::private::bytelevel::slot::bytes::Bytes<typic::private::highlevel::field::Public, typic::private::bytelevel::slot::bytes::kind::Initialized, typenum::uint::UInt<typenum::uint::UTerm, typenum::bit::B1>>`
|
= help: the following implementations were found:
[lots more]
That's definitely supposed to work! Typic's guts were recently in a bit of flux, and I'm not surprised I might have broken something. Thank you very much for filing the issue.
Judging from the error message, it seems like I might have an off-by-one error in the either the layout computation, or maybe when elements are chomped off the array Array, when compatibility is being checked. (Ugh!)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to serialize a struct into a [u8; size] array that has a member that's also a struct. I've tried a lot of variations but nothing works. I this supposed to work? The below code gives this error:
This is the code:
The text was updated successfully, but these errors were encountered: