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

Add support for bytemuck #16

Merged
merged 3 commits into from
May 27, 2024
Merged

Conversation

arturoc
Copy link
Contributor

@arturoc arturoc commented May 27, 2024

Bytemuck allows to cast types into other types and to get the byte representation of a type or a slice or Vecof that type. With this change for example one can do:

let guids = vec![GUID::rand();100];
std::fs::write("guids.bin", bytemuck::cast_slice(&guids))?;

To write several GUIDs as binary data to a file or other stream.

@kurtlawrence kurtlawrence merged commit 33dece8 into kurtlawrence:master May 27, 2024
@kurtlawrence
Copy link
Owner

Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants