Struct wasmflow_interface::maps::ComponentMap
source · [−]pub struct ComponentMap(pub HashMap<String, ComponentSignature>);
Expand description
A HashMap of component names to their signature.
Tuple Fields
0: HashMap<String, ComponentSignature>
Implementations
sourceimpl 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
sourceimpl Clone for ComponentMap
impl Clone for ComponentMap
sourcefn clone(&self) -> ComponentMap
fn clone(&self) -> ComponentMap
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ComponentMap
impl Debug for ComponentMap
sourceimpl Default for ComponentMap
impl Default for ComponentMap
sourcefn default() -> ComponentMap
fn default() -> ComponentMap
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ComponentMap
impl<'de> Deserialize<'de> for ComponentMap
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
sourceimpl From<HashMap<&str, ComponentSignature, RandomState>> for ComponentMap
impl From<HashMap<&str, ComponentSignature, RandomState>> for ComponentMap
sourcefn from(map: HashMap<&str, ComponentSignature>) -> Self
fn from(map: HashMap<&str, ComponentSignature>) -> Self
Converts to this type from the input type.
sourceimpl From<HashMap<String, ComponentSignature, RandomState>> for ComponentMap
impl From<HashMap<String, ComponentSignature, RandomState>> for ComponentMap
sourcefn from(map: HashMap<String, ComponentSignature>) -> Self
fn from(map: HashMap<String, ComponentSignature>) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<ComponentMap> for ComponentMap
impl PartialEq<ComponentMap> for ComponentMap
sourcefn eq(&self, other: &ComponentMap) -> bool
fn eq(&self, other: &ComponentMap) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ComponentMap) -> bool
fn ne(&self, other: &ComponentMap) -> bool
This method tests for !=
.
sourceimpl Serialize for ComponentMap
impl Serialize for ComponentMap
impl StructuralPartialEq for ComponentMap
Auto Trait Implementations
impl RefUnwindSafe for ComponentMap
impl Send for ComponentMap
impl Sync for ComponentMap
impl Unpin for ComponentMap
impl UnwindSafe for ComponentMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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