diff options
author | Benno Lossin <benno.lossin@proton.me> | 2023-04-08 12:25:56 +0000 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-04-12 18:41:05 +0200 |
commit | 92c4a1e7e81cc775b2ad6bedb348098230f7ed87 (patch) | |
tree | d83e5991bdea03d060c2de7f598f0c279f4eb7f2 /rust/macros | |
parent | fc6c6baa1f40ded13e539d0c1a17bcefc00abad9 (diff) |
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/macros')
0 files changed, 0 insertions, 0 deletions