pub struct EnumType {
pub name: LocalTypeIdentifier,
pub assigned_name: String,
pub module_path: Vec<String>,
pub number: TypeNumber,
pub variants: SeqMap<String, EnumVariantTypeRef>,
}
Fields§
§name: LocalTypeIdentifier
§assigned_name: String
§module_path: Vec<String>
§number: TypeNumber
§variants: SeqMap<String, EnumVariantTypeRef>
Implementations§
Source§impl EnumType
impl EnumType
pub fn new( name: LocalTypeIdentifier, assigned_name: &str, module_path: Vec<String>, number: TypeNumber, ) -> Self
pub const fn name(&self) -> &LocalTypeIdentifier
pub fn get_variant(&self, name: &str) -> Option<&EnumVariantTypeRef>
pub fn get_variant_from_index( &self, index: usize, ) -> Option<&EnumVariantTypeRef>
Trait Implementations§
impl Eq for EnumType
impl StructuralPartialEq for EnumType
Auto Trait Implementations§
impl Freeze for EnumType
impl !RefUnwindSafe for EnumType
impl !Send for EnumType
impl !Sync for EnumType
impl Unpin for EnumType
impl !UnwindSafe for EnumType
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