ValueMapHelper

Trait ValueMapHelper 

Source
pub trait ValueMapHelper {
Show 17 methods // Required methods fn sort_by_keys(&mut self); fn sort_by_keys_and_inner_maps(&mut self); fn sort_by_lexicographical_byte_ordering_keys(&mut self); fn sort_by_lexicographical_byte_ordering_keys_and_inner_maps(&mut self); fn get_key(&self, search_key: &str) -> Result<&Value, Error>; fn get_optional_key(&self, key: &str) -> Option<&Value>; fn get_key_mut(&mut self, search_key: &str) -> Result<&mut Value, Error>; fn get_optional_key_mut(&mut self, key: &str) -> Option<&mut Value>; fn get_key_mut_or_insert(&mut self, key: &str, value: Value) -> &mut Value; fn get_key_by_value_mut_or_insert( &mut self, search_key: &Value, value: Value, ) -> &mut Value; fn insert_string_key_value(&mut self, key: String, value: Value); fn remove_key(&mut self, search_key: &str) -> Result<Value, Error>; fn remove_optional_key(&mut self, key: &str) -> Option<Value>; fn remove_optional_key_if_null(&mut self, search_key: &str); fn remove_optional_key_if_empty_array(&mut self, search_key: &str); fn remove_optional_key_value( &mut self, search_key_value: &Value, ) -> Option<Value>; fn from_btree_map<K: Into<Value> + Ord, V: Into<Value>>( btree_map: BTreeMap<K, V>, ) -> Self;
}

Required Methods§

Source

fn sort_by_keys(&mut self)

Source

fn sort_by_keys_and_inner_maps(&mut self)

Source

fn sort_by_lexicographical_byte_ordering_keys(&mut self)

Source

fn sort_by_lexicographical_byte_ordering_keys_and_inner_maps(&mut self)

Source

fn get_key(&self, search_key: &str) -> Result<&Value, Error>

Source

fn get_optional_key(&self, key: &str) -> Option<&Value>

Source

fn get_key_mut(&mut self, search_key: &str) -> Result<&mut Value, Error>

Source

fn get_optional_key_mut(&mut self, key: &str) -> Option<&mut Value>

Source

fn get_key_mut_or_insert(&mut self, key: &str, value: Value) -> &mut Value

Source

fn get_key_by_value_mut_or_insert( &mut self, search_key: &Value, value: Value, ) -> &mut Value

Source

fn insert_string_key_value(&mut self, key: String, value: Value)

Source

fn remove_key(&mut self, search_key: &str) -> Result<Value, Error>

Source

fn remove_optional_key(&mut self, key: &str) -> Option<Value>

Source

fn remove_optional_key_if_null(&mut self, search_key: &str)

Source

fn remove_optional_key_if_empty_array(&mut self, search_key: &str)

Source

fn remove_optional_key_value( &mut self, search_key_value: &Value, ) -> Option<Value>

Source

fn from_btree_map<K: Into<Value> + Ord, V: Into<Value>>( btree_map: BTreeMap<K, V>, ) -> Self

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.

Implementors§