pub trait StringlyTyped {
// Required methods
fn set_value<K, S>(
&mut self,
keys: K,
value: Value,
) -> Result<(), UpdateError>
where K: IntoIterator<Item = S>,
S: AsRef<str>;
fn get_value<K, S>(&self, keys: K) -> Result<Value, UpdateError>
where K: IntoIterator<Item = S>,
S: AsRef<str>;
fn data_type(&self) -> &'static str;
// Provided methods
fn get(&self, key: &str) -> Result<Value, UpdateError> { ... }
fn set(&mut self, key: &str, value: Value) -> Result<(), UpdateError> { ... }
}
Expand description
The whole point.
Required Methods§
fn set_value<K, S>(&mut self, keys: K, value: Value) -> Result<(), UpdateError>
fn get_value<K, S>(&self, keys: K) -> Result<Value, UpdateError>
fn data_type(&self) -> &'static str
Provided Methods§
fn get(&self, key: &str) -> Result<Value, UpdateError>
fn set(&mut self, key: &str, value: Value) -> Result<(), UpdateError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.