danielhenrymantilla / rust-uninit

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

Improve documentation #13

Open kupiakos opened 10 months ago

kupiakos commented 10 months ago
kupiakos commented 10 months ago

Some requested top-level usage examples for Out (this list will be edited as further examples are requested):

vsukhoml commented 10 months ago

I'd also add construction of empty output slice like Out::from(&mut []) which doesn't work out of the box.

Another suggestion - more From patterns like From<MaybeUninit<[T; N]>> and From<[MaybeUninit<T>; N]>.

When dealing with C FFI code I found that from_raw_parts_mut would be a nice feature of Out

kupiakos commented 10 months ago

@vsukhoml

Adding these features already have tracking issues from our conversations - though feel free to post additional examples or doc improvements you'd like to see. 😄

I'd also add construction of empty output slice like Out::from(&mut []) which doesn't work out of the box.

22

Another suggestion - more From patterns like From<MaybeUninit<[T; N]>> and From<[MaybeUninit<T>; N]>.

23

When dealing with C FFI code I found that from_raw_parts_mut would be a nice feature of Out

11