pub struct ComponentMap(pub HashMap<String, ComponentSignature>);
Expand description
A HashMap of component names to their signature.
Tuple Fields§
§0: HashMap<String, ComponentSignature>
Implementations§
Source§impl ComponentMap
impl ComponentMap
Sourcepub fn get<K: AsRef<str>>(&self, field: K) -> Option<&ComponentSignature>
pub fn get<K: AsRef<str>>(&self, field: K) -> Option<&ComponentSignature>
Get the value for the requested field.
Sourcepub fn get_mut<K: AsRef<str>>(
&mut self,
field: K,
) -> Option<&mut ComponentSignature>
pub fn get_mut<K: AsRef<str>>( &mut self, field: K, ) -> Option<&mut ComponentSignature>
Get the value for the requested field.
Sourcepub fn contains_key<K: AsRef<str>>(&self, field: K) -> bool
pub fn contains_key<K: AsRef<str>>(&self, field: K) -> bool
Get the value for the requested field.
Sourcepub fn insert<K: AsRef<str>>(&mut self, field: K, value: ComponentSignature)
pub fn insert<K: AsRef<str>>(&mut self, field: K, value: ComponentSignature)
Insert a $t into the inner map.
Sourcepub fn remove(&mut self, key: &str) -> Option<ComponentSignature>
pub fn remove(&mut self, key: &str) -> Option<ComponentSignature>
Remove a value from the inner Map.
Sourcepub fn into_inner(self) -> HashMap<String, ComponentSignature>
pub fn into_inner(self) -> HashMap<String, ComponentSignature>
Return the inner HashMap.
Sourcepub fn inner(&self) -> &HashMap<String, ComponentSignature>
pub fn inner(&self) -> &HashMap<String, ComponentSignature>
Return a reference to the inner HashMap.
Trait Implementations§
Source§impl Clone for ComponentMap
impl Clone for ComponentMap
Source§fn clone(&self) -> ComponentMap
fn clone(&self) -> ComponentMap
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ComponentMap
impl Debug for ComponentMap
Source§impl Default for ComponentMap
impl Default for ComponentMap
Source§fn default() -> ComponentMap
fn default() -> ComponentMap
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ComponentMap
impl<'de> Deserialize<'de> for ComponentMap
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 From<HashMap<&str, ComponentSignature>> for ComponentMap
impl From<HashMap<&str, ComponentSignature>> for ComponentMap
Source§impl From<HashMap<String, ComponentSignature>> for ComponentMap
impl From<HashMap<String, ComponentSignature>> for ComponentMap
Source§impl PartialEq for ComponentMap
impl PartialEq for ComponentMap
Source§impl Serialize for ComponentMap
impl Serialize for ComponentMap
impl StructuralPartialEq for ComponentMap
Auto Trait Implementations§
impl Freeze for ComponentMap
impl RefUnwindSafe for ComponentMap
impl Send for ComponentMap
impl Sync for ComponentMap
impl Unpin for ComponentMap
impl UnwindSafe for ComponentMap
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