MCPcopy Create free account
hub / github.com/daisy/MathCAT / set_api_string_pref

Method set_api_string_pref

src/prefs.rs:866–872  ·  view source on GitHub ↗

Set the string-valued preference.

(&mut self, key: &str, value: &str)

Source from the content-addressed store, hash-verified

864
865 /// Set the string-valued preference.
866 pub fn set_api_string_pref(&mut self, key: &str, value: &str) {
867 if !self.error.is_empty() {
868 panic!("Internal error: set_api_string_pref called on invalid PreferenceManager -- error message\n{}", &self.error);
869 };
870
871 self.api_prefs.prefs.insert(key.to_string(), Yaml::String(value.to_string()));
872 }
873
874 /// Set the number-valued preference.
875 /// All number-valued preferences are stored with type `f64`.

Callers 1

set_preferenceFunction · 0.80

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected