Trait StringlyTyped

Source
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§

Source

fn set_value<K, S>(&mut self, keys: K, value: Value) -> Result<(), UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source

fn get_value<K, S>(&self, keys: K) -> Result<Value, UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source

fn data_type(&self) -> &'static str

Provided Methods§

Source

fn get(&self, key: &str) -> Result<Value, UpdateError>

Source

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.

Implementations on Foreign Types§

Source§

impl StringlyTyped for f64

Source§

fn set_value<K, S>(&mut self, keys: K, value: Value) -> Result<(), UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source§

fn get_value<K, S>(&self, keys: K) -> Result<Value, UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source§

fn data_type(&self) -> &'static str

Source§

impl StringlyTyped for i64

Source§

fn set_value<K, S>(&mut self, keys: K, value: Value) -> Result<(), UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source§

fn get_value<K, S>(&self, keys: K) -> Result<Value, UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source§

fn data_type(&self) -> &'static str

Source§

impl StringlyTyped for String

Source§

fn set_value<K, S>(&mut self, keys: K, value: Value) -> Result<(), UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source§

fn get_value<K, S>(&self, keys: K) -> Result<Value, UpdateError>
where K: IntoIterator<Item = S>, S: AsRef<str>,

Source§

fn data_type(&self) -> &'static str

Implementors§