Struct semantic_analyzer::types::types::StructTypes
source · pub struct StructTypes {
pub name: String,
pub attributes: HashMap<ValueName, StructAttributeType>,
pub methods: HashMap<String, FunctionName>,
}Expand description
Struct types
Basic entity for struct type itself.
Fields§
§name: StringType name
attributes: HashMap<ValueName, StructAttributeType>Struct attributes
methods: HashMap<String, FunctionName>Struct methods
Trait Implementations§
source§impl Clone for StructTypes
impl Clone for StructTypes
source§fn clone(&self) -> StructTypes
fn clone(&self) -> StructTypes
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 StructTypes
impl Debug for StructTypes
source§impl From<StructTypes<'_>> for StructTypes
impl From<StructTypes<'_>> for StructTypes
source§fn from(value: StructTypes<'_>) -> Self
fn from(value: StructTypes<'_>) -> Self
Converts to this type from the input type.
source§impl PartialEq for StructTypes
impl PartialEq for StructTypes
source§fn eq(&self, other: &StructTypes) -> bool
fn eq(&self, other: &StructTypes) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TypeAttributes for StructTypes
impl TypeAttributes for StructTypes
source§fn get_attribute_index(&self, attr_name: &ValueName) -> Option<u32>
fn get_attribute_index(&self, attr_name: &ValueName) -> Option<u32>
Get attribute index by value name for the parent type
source§fn get_attribute_type(&self, attr_name: &ValueName) -> Option<Type>
fn get_attribute_type(&self, attr_name: &ValueName) -> Option<Type>
Get attribute type by value name for the parent type
source§fn get_method(&self, method_name: String) -> Option<FunctionName>
fn get_method(&self, method_name: String) -> Option<FunctionName>
Get function name for the parent type by method name
source§fn is_attribute(&self, attr_name: &ValueName) -> bool
fn is_attribute(&self, attr_name: &ValueName) -> bool
Check is value attribute
impl Eq for StructTypes
impl StructuralEq for StructTypes
impl StructuralPartialEq for StructTypes
Auto Trait Implementations§
impl RefUnwindSafe for StructTypes
impl Send for StructTypes
impl Sync for StructTypes
impl Unpin for StructTypes
impl UnwindSafe for StructTypes
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