Re: [PATCH v7 13/15] rust: types: add `Opaque::ffi_init`
From: Alice Ryhl
Date: Tue Apr 11 2023 - 04:13:23 EST
On Sat, Apr 8, 2023, at 2:26 PM, Benno Lossin wrote:
> This function allows to easily initialize `Opaque` with the pin-init
> API. `Opaque::ffi_init` takes a closure and returns a pin-initializer.
> This pin-initiailizer calls the given closure with a pointer to the
> inner `T`.
>
> Co-developed-by: Gary Guo <gary@xxxxxxxxxxx>
> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
> Signed-off-by: Benno Lossin <y86-dev@xxxxxxxxxxxxxx>
> Cc: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Cc: Andreas Hindborg <a.hindborg@xxxxxxxxxxx>
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>