diff options
author | Benno Lossin <benno.lossin@proton.me> | 2023-04-08 14:25:56 +0200 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-04-12 18:41:05 +0200 |
commit | 92c4a1e7e81cc775b2ad6bedb348098230f7ed87 (patch) | |
tree | d83e5991bdea03d060c2de7f598f0c279f4eb7f2 /rust/kernel/init | |
parent | rust: init: add initialization macros (diff) | |
download | linux-92c4a1e7e81cc775b2ad6bedb348098230f7ed87.tar.xz linux-92c4a1e7e81cc775b2ad6bedb348098230f7ed87.zip |
rust: init/sync: add `InPlaceInit` trait to pin-initialize smart pointers
The `InPlaceInit` trait that provides two functions, for initializing
using `PinInit<T, E>` and `Init<T>`. It is implemented by `Arc<T>`,
`UniqueArc<T>` and `Box<T>`.
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Link: https://lore.kernel.org/r/20230408122429.1103522-9-y86-dev@protonmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/init')
0 files changed, 0 insertions, 0 deletions