pub struct FieldMap(/* private fields */);
Expand description
A HashMap of type names to their signature.
Implementations§
Source§impl 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§
Source§impl<'de> Deserialize<'de> for FieldMap
impl<'de> Deserialize<'de> for FieldMap
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 FromIterator<(String, TypeSignature)> for FieldMap
impl FromIterator<(String, TypeSignature)> for FieldMap
Source§fn 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 Freeze for FieldMap
impl RefUnwindSafe for FieldMap
impl Send for FieldMap
impl Sync for FieldMap
impl Unpin for FieldMap
impl UnwindSafe for FieldMap
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