Closed
Description
Progress
- Decide between
ToBytes
andIntoBytes
- Decided to go with
IntoBytes
so thatFromBytes
/IntoBytes
is symmetrical with stdlib'sFrom
/Into
- Decided to go with
- Implementation
- In progress in #700
Description
Now that AsBytes
permits UnsafeCells
as part of #251, it can be implemented for types which support value-only transmutation (ie, for which fn as_bytes(&self) -> &[u8] where Self: NoCell
is not available because Self: !NoCell
). Given this change, a more appropriate name for the trait would be IntoBytes
. This also brings our pair of FromBytes
/IntoBytes
into line with the existing pattern of From
/Into
.