Struct wasmflow_interface::maps::FieldMap
source · [−]pub struct FieldMap(_);
Expand description
A HashMap of type names to their signature.
Implementations
sourceimpl FieldMap
impl FieldMap
sourcepub fn get<K: AsRef<str>>(&self, field: K) -> Option<&TypeSignature>
pub fn get<K: AsRef<str>>(&self, field: K) -> Option<&TypeSignature>
Get the value for the requested field.
sourcepub fn get_mut<K: AsRef<str>>(&mut self, field: K) -> Option<&mut TypeSignature>
pub fn get_mut<K: AsRef<str>>(&mut self, field: K) -> Option<&mut TypeSignature>
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: TypeSignature)
pub fn insert<K: AsRef<str>>(&mut self, field: K, value: TypeSignature)
Insert a $t into the inner map.
sourcepub fn remove(&mut self, key: &str) -> Option<TypeSignature>
pub fn remove(&mut self, key: &str) -> Option<TypeSignature>
Remove a value from the inner Map.
sourcepub fn into_inner(self) -> HashMap<String, TypeSignature>
pub fn into_inner(self) -> HashMap<String, TypeSignature>
Return the inner HashMap.
sourcepub fn inner(&self) -> &HashMap<String, TypeSignature>
pub fn inner(&self) -> &HashMap<String, TypeSignature>
Return a reference to the inner HashMap.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for FieldMap
impl<'de> Deserialize<'de> for FieldMap
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<String, TypeSignature, RandomState>> for FieldMap
impl From<HashMap<String, TypeSignature, RandomState>> for FieldMap
sourcefn from(map: HashMap<String, TypeSignature>) -> Self
fn from(map: HashMap<String, TypeSignature>) -> Self
Converts to this type from the input type.
sourceimpl FromIterator<(String, TypeSignature)> for FieldMap
impl FromIterator<(String, TypeSignature)> for FieldMap
sourcefn from_iter<T: IntoIterator<Item = (String, TypeSignature)>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = (String, TypeSignature)>>(iter: T) -> Self
Creates a value from an iterator. Read more
impl StructuralPartialEq for FieldMap
Auto Trait Implementations
impl RefUnwindSafe for FieldMap
impl Send for FieldMap
impl Sync for FieldMap
impl Unpin for FieldMap
impl UnwindSafe for FieldMap
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