On Mon, Mar 23, 2026 at 1:48 PM Andreas Hindborg <[email protected]> wrote: > > Rename the existing `value()` method to `value_ref()` which returns a > shared reference to the parameter value, and add a new `value()` > method on `ModuleParamAccess<T>` where `T: Copy` that returns the > value by copy. > > This provides a more ergonomic API for the common case where the > parameter type implements `Copy`, avoiding the need to explicitly > dereference the return value at call sites. > > Currently `value_ref()` has no in-tree callers, but it will be needed > when support for non-`Copy` parameter types such as arrays and > strings is added. > > Signed-off-by: Andreas Hindborg <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>

