linux/rust/pin-init/examples
Gary Guo d5492db2bf rust: pin-init: add raw_init and raw_try_init and recommend over __init
The `__init` method is not designed to be a public API (existence of "__"
is a hint for this); but currently there is no other API that allows raw
initialization on pointers. Add `raw_init` and `raw_try_init` and recommend
people to use this instead if raw pointer initialization is needed.

Link: https://patch.msgid.link/20260729-merge-init-v2-3-26adf47109e7@garyguo.net
[ Renamed from `ptr_[try_]init` to `raw_[try_]init`. - Gary ]
Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Gary Guo <gary@garyguo.net>
2026-08-05 11:36:16 +01:00
..
big_struct_in_place.rs rust: pin-init: bump minimum Rust version to 1.82 2026-05-10 22:58:33 +01:00
error.rs rust: pin-init: examples: mark as #[inline] all From::from()s for Error 2026-05-10 22:58:33 +01:00
linked_list.rs rust: pin-init: bump minimum Rust version to 1.82 2026-05-10 22:58:33 +01:00
mutex.rs rust: pin-init: examples: use Wrapper::pin_init instead of manual reimplementation 2026-08-03 13:36:34 +01:00
pthread_mutex.rs rust: pin-init: examples: fix useless_borrows_in_formatting clippy warning 2026-05-10 23:00:51 +01:00
static_init.rs rust: pin-init: add raw_init and raw_try_init and recommend over __init 2026-08-05 11:36:16 +01:00