pub fn with_parameter<T: Clone, R>(
get: fn() -> T,
set: fn(T),
value: T,
test: impl FnOnce() -> R,
) -> RExpand description
Runs test with a parameter_types! static set to value, and restores the previous value
when test ends, whether it returns or panics.
get and set are the accessors parameter_types! generates for the static, for example
GasScale::get and GasScale::set.