pub struct TypeMap(pub HashMap<String, TypeDefinition>);
Expand description
A HashMap of struct names to their signature.
Tuple Fields§
§0: HashMap<String, TypeDefinition>
Implementations§
Source§impl TypeMap
impl TypeMap
Sourcepub fn get<K: AsRef<str>>(&self, field: K) -> Option<&TypeDefinition>
pub fn get<K: AsRef<str>>(&self, field: K) -> Option<&TypeDefinition>
Get the value for the requested field.
Sourcepub fn get_mut<K: AsRef<str>>(
&mut self,
field: K,
) -> Option<&mut TypeDefinition>
pub fn get_mut<K: AsRef<str>>( &mut self, field: K, ) -> Option<&mut TypeDefinition>
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: TypeDefinition)
pub fn insert<K: AsRef<str>>(&mut self, field: K, value: TypeDefinition)
Insert a $t into the inner map.
Sourcepub fn remove(&mut self, key: &str) -> Option<TypeDefinition>
pub fn remove(&mut self, key: &str) -> Option<TypeDefinition>
Remove a value from the inner Map.
Sourcepub fn into_inner(self) -> HashMap<String, TypeDefinition>
pub fn into_inner(self) -> HashMap<String, TypeDefinition>
Return the inner HashMap.
Sourcepub fn inner(&self) -> &HashMap<String, TypeDefinition>
pub fn inner(&self) -> &HashMap<String, TypeDefinition>
Return a reference to the inner HashMap.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TypeMap
impl<'de> Deserialize<'de> for TypeMap
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
impl StructuralPartialEq for TypeMap
Auto Trait Implementations§
impl Freeze for TypeMap
impl RefUnwindSafe for TypeMap
impl Send for TypeMap
impl Sync for TypeMap
impl Unpin for TypeMap
impl UnwindSafe for TypeMap
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