The ParamsKey trait could also have a function to indicate whether each variant is deprecated or not. So that when deserializing a params file, the user can be warned about using deprecated parameters.
fn is_deprecated(self) -> bool {
match self {
FlowParamsKey::SomeOldParam => Err(Deprecated { hint: "Use new_param instead".to_string(), }),
_ => Ok(()),
}
}
This helps to inform the user to remove unnecessary params keys, and maybe migrate them.
Maybe need to think about this alongside ParamsSpecs.
The
ParamsKeytrait could also have a function to indicate whether each variant is deprecated or not. So that when deserializing a params file, the user can be warned about using deprecated parameters.This helps to inform the user to remove unnecessary params keys, and maybe migrate them.
Maybe need to think about this alongside
ParamsSpecs.