Open kupiakos opened 10 months ago
Some requested top-level usage examples for Out
(this list will be edited as further examples are requested):
FromBytes
type with a non-zero byte valueOut
, slice and SizedOut
from initialized data, slice and SizedOut
from uninit data, slice and SizedI'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
@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.
Another suggestion - more
From
patterns likeFrom<MaybeUninit<[T; N]>>
andFrom<[MaybeUninit<T>; N]>
.
When dealing with C FFI code I found that
from_raw_parts_mut
would be a nice feature ofOut