-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zerocopy] Add Unalign, read/write methods
Add `Unalign`, which wraps a type and removes any alignment requirement, allowing it to be safely read from any location in memory regardless of alignment. Add `FromBytes` constructors `read`, `read_from_prefix`, and `read_from_suffix`, which read an instance of a `FromBytes` type from a byte slice. Add `AsBytes` methods `write`, `write_to_prefix`, and `write_to_suffix`, which write a copy of `self` to a byte slices. Add `LayoutVerified::<_, T>::read`, which reads a `T` from the underlying bytes. Add `LayoutVerified::<_, T>::write`, which writes a `T` to the underlying bytes. Release zerocopy version 0.6.0. Change-Id: Ibeff90a8f950b832178eecc550b42ecfc98d79f2 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/570485 Commit-Queue: Joshua Liebow-Feeser <[email protected]> Reviewed-by: Tyler Mandry <[email protected]> Reviewed-by: Adam Perry <[email protected]> Reviewed-by: Manish Goregaokar <[email protected]>
- Loading branch information
Showing
2 changed files
with
258 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
[package] | ||
edition = "2018" | ||
name = "zerocopy" | ||
version = "0.5.1" | ||
version = "0.6.0" | ||
authors = ["Joshua Liebow-Feeser <[email protected]>"] | ||
description = "Utilities for zero-copy parsing and serialization" | ||
license = "BSD-3-Clause" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters