pub struct Tags(BTreeMap<String, String>);
Expand description
Convenience functions around a string->string map
Tuple Fields§
§0: BTreeMap<String, String>
Implementations§
source§impl 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§
source§impl<'de> Deserialize<'de> for Tags
impl<'de> Deserialize<'de> for Tags
source§fn 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
source§impl PartialEq for Tags
impl PartialEq for Tags
impl StructuralPartialEq for Tags
Auto Trait Implementations§
impl Freeze for Tags
impl RefUnwindSafe for Tags
impl Send for Tags
impl Sync for Tags
impl Unpin for Tags
impl UnwindSafe for Tags
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more