pub trait SetGet {
fn get_string(&self, cvar_name: &str) -> Result<String, String>;
fn set_str(&mut self, cvar_name: &str, str_value: &str) -> Result<(), String>;
}Expand description
A trait for writing generic code that can access cvars but doesn’t know the concrete Cvars struct.
This is implemented automatically by both #[derive(SetGet)] and cvars! {}.
The methods provided here call those implemented directly on the concrete Cvars struct, there is no difference between them.
Implementation note: This trait can’t include the get and set methods
because it would no longer be object-safe.