danielhenrymantilla / rust-uninit

Read trait fixed to soundly work with uninitalized memory
MIT License
25 stars 2 forks source link

Add `zerocopy`-aware methods #27

Open kupiakos opened 10 months ago

kupiakos commented 10 months ago

Gated by a non-default feature.

kupiakos commented 10 months ago

These could also work, but there are likely conflicting blanket impls for these to all be From methods:

kupiakos commented 10 months ago

The most flexible and simple of these is the Out<T: ?Sized + FromBytes> -> Out<[u8]> conversion. The rest either involve Unaligned bounds or dynamic alignment checks.