Re: [PATCH v2 4/5] rust: init: add common init-helper functions for `Opaque`

From: Benno Lossin
Date: Wed Mar 22 2023 - 12:19:10 EST


On 21.03.23 21:06, Boqun Feng wrote:
> I wonder whether it's better to make these as methods of Opaque<T>, i.e.
>
> impl<T> Opaque<T> {
> pub unsafe fn ffi_init(...) -> impl PinInit<Self> {
> ...
> }
> ...
> }
>
> then it's a little more obvious to users that these methods are for
> Opaque type pin init.
>
> Thoughts?

That would work, will add it to v3.

Cheers,
Benno