pub struct StringMap(/* private fields */);
Implementations§
Source§impl StringMap
impl StringMap
pub fn insert<T: Any + Send + Sync>(&mut self, key: &str, x: T) -> Option<T>
pub fn remove<T: Any + Send + Sync>(&mut self, key: &str) -> Option<T>
pub fn get<T: Any + Send + Sync>(&self, key: &str) -> Option<&T>
pub fn get_mut<T: Any + Send + Sync>(&mut self, key: &str) -> Option<&mut T>
pub fn get_key_value<'s, T: Any + Send + Sync>( &self, key: &'s str, ) -> Option<(&'s str, &T)>
Source§impl StringMap
impl StringMap
pub fn new() -> Self
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> Keys<'_, Box<str>, Box<dyn Any + Send + Sync>>
pub fn values(&self) -> Values<'_, Box<str>, Box<dyn Any + Send + Sync>>
pub fn iter(&self) -> Iter<'_, Box<str>, Box<dyn Any + Send + Sync>>
pub fn contains_key(&self, key: &str) -> bool
pub fn clear(&mut self)
pub fn values_mut( &mut self, ) -> ValuesMut<'_, Box<str>, Box<dyn Any + Send + Sync>>
pub fn entry( &mut self, key: &str, ) -> Entry<'_, Box<str>, Box<dyn Any + Send + Sync>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StringMap
impl !RefUnwindSafe for StringMap
impl Send for StringMap
impl Sync for StringMap
impl Unpin for StringMap
impl !UnwindSafe for StringMap
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