-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
compatibility-nonbreakingChanges that are (likely to be) non-breakingChanges that are (likely to be) non-breaking
Description
For two possible approaches, see #1183 and #1735.
Currently, we support T -> U conversions using the transmute! macro when T: AsBytes, U: FromBytes, and T and U have the same size. In principle, we ought to be able to support a range of conversions for container types wrapping T and U so long as those containers have well-defined layouts. Specifically:
- Slices
Box(the docs guaranteeBox's layout forSizedtypes)ManuallyDrop(the docs guarantee thatManuallyDrop<T>'s layout is equivalent toT's)Wrapping(the docs guarantee thatWrapping<T>'s layout is equivalent toT's)
...and possibly others.
This will help unblock ICU4X using zerocopy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
compatibility-nonbreakingChanges that are (likely to be) non-breakingChanges that are (likely to be) non-breaking