pub trait ParamMut<T> {
// Required method
fn param_mut(&mut self) -> &mut T;
}Expand description
Item of type T has been set in a certain_map slot and returns a mutable reference.
When used as a trait bound, ParamMut<T> ensures that the constrained type has previously
used the ParamSet<T> trait to set the value of type T in a
certain_map slot. This allows the caller to guarantee at compile-time that the value of
T is available and can be mutably accessed from the implementing type using the
param_mut method.
§Example
fn process_param_mut<P: ParamMut<T>, T>(param_provider: &mut P) {
let value_mut: &mut T = param_provider.param_mut();
// Modify the value of type T
}