pub enum Type {
Show 13 variants
Base(Base),
Array(Array),
Map(Map),
Tuple(Tuple),
String(FeString),
Contract(ContractId),
SelfContract(ContractId),
SelfType(TraitOrType),
Struct(StructId),
Enum(EnumId),
Generic(Generic),
SPtr(TypeId),
Mut(TypeId),
}
Variants§
Base(Base)
Array(Array)
Map(Map)
Tuple(Tuple)
String(FeString)
Contract(ContractId)
An “external” contract. Effectively just a newtype
d address.
SelfContract(ContractId)
The type of a contract while it’s being executed. Ie. the type
of self
within a contract function.
SelfType(TraitOrType)
Struct(StructId)
Enum(EnumId)
Generic(Generic)
SPtr(TypeId)
Mut(TypeId)
Implementations§
Source§impl Type
impl Type
pub fn id(&self, db: &dyn AnalyzerDb) -> TypeId
pub fn name(&self, db: &dyn AnalyzerDb) -> SmolStr
pub fn def_span(&self, context: &dyn AnalyzerContext) -> Option<Span>
pub fn is_unit(&self) -> bool
pub fn int(int_type: Integer) -> Self
pub fn has_fixed_size(&self, db: &dyn AnalyzerDb) -> bool
Trait Implementations§
Source§impl DisplayWithDb for Type
impl DisplayWithDb for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl !Send for Type
impl !Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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,
Source§impl<T> Displayable for Twhere
T: DisplayWithDb,
impl<T> Displayable for Twhere
T: DisplayWithDb,
fn display<'a, 'b>( &'a self, db: &'b dyn AnalyzerDb, ) -> DisplayableWrapper<'b, &'a Self>
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.