summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorBenno Lossin <benno.lossin@proton.me>2023-04-08 12:26:22 +0000
committerMiguel Ojeda <ojeda@kernel.org>2023-04-12 18:41:05 +0200
commit692e8935e23efab6c5d5fc4b003816b33c8082f7 (patch)
tree18fe62f03bfdc6475f4e0ab63eb952cc4d98aaa3 /block
parent8586f1acd314a47d68d189331606ca235a05b972 (diff)
downloadlinux-stable-692e8935e23efab6c5d5fc4b003816b33c8082f7.tar.gz
linux-stable-692e8935e23efab6c5d5fc4b003816b33c8082f7.tar.bz2
linux-stable-692e8935e23efab6c5d5fc4b003816b33c8082f7.zip
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>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions