rust: types: add `Opaque::ffi_init`
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@garyguo.net> Signed-off-by:
Gary Guo <gary@garyguo.net> Signed-off-by:
Benno Lossin <benno.lossin@proton.me> Reviewed-by:
Andreas Hindborg <a.hindborg@samsung.com> Reviewed-by:
Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20230408122429.1103522-14-y86-dev@protonmail.com [ Fixed typo. ] Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
Showing
Please register or sign in to comment