aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorBenno Lossin <benno.lossin@proton.me>2023-04-08 12:26:07 +0000
committerMiguel Ojeda <ojeda@kernel.org>2023-04-12 18:41:05 +0200
commit6841d45a303029c54d6ad1ebb5dc72f7b2a74700 (patch)
tree27f649511edf9eba57f7c7ed89f97a929f12a115 /samples
parentd0fdc3961270617826e4794fca1d092853847707 (diff)
rust: init: add `stack_pin_init!` macro
The `stack_pin_init!` macro allows pin-initializing a value on the stack. It accepts a `impl PinInit<T, E>` to initialize a `T`. It allows propagating any errors via `?` or handling it normally via `match`. Signed-off-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://lore.kernel.org/r/20230408122429.1103522-11-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions