Struct abstutil::collections::Tags
source · [−]Expand description
Convenience functions around a string->string map
Tuple Fields
0: BTreeMap<String, String>
Implementations
sourceimpl Tags
impl Tags
pub fn new(map: BTreeMap<String, String>) -> Tags
pub fn empty() -> Tags
pub fn get(&self, k: &str) -> Option<&String>
pub fn get_result(&self, k: &str) -> Result<&String>
pub fn contains_key(&self, k: &str) -> bool
pub fn has_any(&self, keys: Vec<&str>) -> bool
pub fn is(&self, k: &str, v: &str) -> bool
pub fn is_any(&self, k: &str, values: Vec<&str>) -> bool
pub fn insert<K: Into<String>, V: Into<String>>(&mut self, k: K, v: V)
pub fn remove(&mut self, k: &str) -> Option<String>
pub fn is_empty(&self) -> bool
pub fn inner(&self) -> &BTreeMap<String, String>
pub fn into_inner(self) -> BTreeMap<String, String>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Tags
impl<'de> Deserialize<'de> for Tags
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Tags
Auto Trait Implementations
impl RefUnwindSafe for Tags
impl Send for Tags
impl Sync for Tags
impl Unpin for Tags
impl UnwindSafe for Tags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more