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
Provide #[archive(as = "...")]
for users to provide their own archive types
#128
Comments
Also provide the syntax #[archive(self = "Self<T::Archived>")]
struct Example<T>(T); Which currently generate an |
This should probably be reworked into |
#[archive(copy)]
to #[archive(self)]
#[archive(as = "...")]
for users to provide their own archive types
Fixed by 818e9f0 |
Fantastic, I was just looking for how to do this! |
I wonder if there is a way to implement |
You can implement |
Yes, using the zerocopy crate to derive AsBytes for simple structs. |
With the changes around
ArchiveCopy
(#119) the idea of a type being archiveable as itself needs to be changed too.Adding
#[archive(self)]
to a type should:T: Archive<Archived = Self>
bounds for each of the fields#[archive_attr]
or other attributes except#[archive(copy_safe)]
repr
The text was updated successfully, but these errors were encountered: