pub enum TypeDef {
Alias(TypeAliasId),
Struct(StructId),
Enum(EnumId),
Contract(ContractId),
Primitive(Base),
}
Variants§
Implementations§
Source§impl TypeDef
impl TypeDef
pub fn items(&self, db: &dyn AnalyzerDb) -> Rc<IndexMap<SmolStr, Item>>
pub fn name(&self, db: &dyn AnalyzerDb) -> SmolStr
pub fn name_span(&self, db: &dyn AnalyzerDb) -> Option<Span>
pub fn typ(&self, db: &dyn AnalyzerDb) -> Result<Type, TypeError>
pub fn type_id(&self, db: &dyn AnalyzerDb) -> Result<TypeId, TypeError>
pub fn is_public(&self, db: &dyn AnalyzerDb) -> bool
pub fn parent(&self, db: &dyn AnalyzerDb) -> Option<Item>
pub fn sink_diagnostics( &self, db: &dyn AnalyzerDb, sink: &mut impl DiagnosticSink, )
Trait Implementations§
Source§impl Ord for TypeDef
impl Ord for TypeDef
Source§impl PartialOrd for TypeDef
impl PartialOrd for TypeDef
impl Copy for TypeDef
impl Eq for TypeDef
impl StructuralPartialEq for TypeDef
Auto Trait Implementations§
impl Freeze for TypeDef
impl RefUnwindSafe for TypeDef
impl Send for TypeDef
impl Sync for TypeDef
impl Unpin for TypeDef
impl UnwindSafe for TypeDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.