Struct serde_lite::Map
source · pub struct Map { /* private fields */ }Expand description
Map from string keys to Intermediate values.
It wraps the underlying map implementation and prohibits inlining of some methods in order to make the generated code smaller.
Implementations§
source§impl Map
impl Map
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new map with a given capacity.
sourcepub fn get(&self, key: &str) -> Option<&Intermediate>
pub fn get(&self, key: &str) -> Option<&Intermediate>
Get value associated with a given key.
sourcepub fn insert_with_static_key(&mut self, key: &'static str, value: Intermediate)
pub fn insert_with_static_key(&mut self, key: &'static str, value: Intermediate)
Insert a given key-value pair into the map.
sourcepub fn insert_with_owned_key(&mut self, key: String, value: Intermediate)
pub fn insert_with_owned_key(&mut self, key: String, value: Intermediate)
Insert a given key-value pair into the map.