pub struct TypeId(pub u32);
Expand description
An interned Id for ArrayDef
.
Tuple Fields§
§0: u32
Implementations§
Source§impl TypeId
impl TypeId
pub fn data(self, db: &dyn MirDb) -> Rc<Type>
pub fn analyzer_ty(self, db: &dyn MirDb) -> Option<TypeId>
pub fn projection_ty(self, db: &dyn MirDb, access: &Value) -> TypeId
pub fn deref(self, db: &dyn MirDb) -> TypeId
pub fn make_sptr(self, db: &dyn MirDb) -> TypeId
pub fn make_mptr(self, db: &dyn MirDb) -> TypeId
pub fn projection_ty_imm(self, db: &dyn MirDb, index: usize) -> TypeId
pub fn aggregate_field_num(self, db: &dyn MirDb) -> usize
pub fn enum_disc_type(self, db: &dyn MirDb) -> TypeId
pub fn enum_data_offset(self, db: &dyn MirDb, slot_size: usize) -> usize
pub fn enum_variant_type( self, db: &dyn MirDb, variant_id: EnumVariantId, ) -> TypeId
pub fn index_from_fname(self, db: &dyn MirDb, fname: &str) -> BigInt
pub fn is_primitive(self, db: &dyn MirDb) -> bool
pub fn is_integral(self, db: &dyn MirDb) -> bool
pub fn is_address(self, db: &dyn MirDb) -> bool
pub fn is_unit(self, db: &dyn MirDb) -> bool
pub fn is_enum(self, db: &dyn MirDb) -> bool
pub fn is_signed(self, db: &dyn MirDb) -> bool
Sourcepub fn size_of(self, db: &dyn MirDb, slot_size: usize) -> usize
pub fn size_of(self, db: &dyn MirDb, slot_size: usize) -> usize
Returns size of the type in bytes.
pub fn is_zero_sized(self, db: &dyn MirDb) -> bool
pub fn align_of(self, db: &dyn MirDb, slot_size: usize) -> usize
Sourcepub fn aggregate_elem_offset<T>(
self,
db: &dyn MirDb,
elem_idx: T,
slot_size: usize,
) -> usizewhere
T: ToPrimitive,
pub fn aggregate_elem_offset<T>(
self,
db: &dyn MirDb,
elem_idx: T,
slot_size: usize,
) -> usizewhere
T: ToPrimitive,
Returns an offset of the element of aggregate type.
pub fn is_aggregate(self, db: &dyn MirDb) -> bool
pub fn is_struct(self, db: &dyn MirDb) -> bool
pub fn is_array(self, db: &dyn MirDb) -> bool
pub fn is_string(self, db: &dyn MirDb) -> bool
pub fn is_ptr(self, db: &dyn MirDb) -> bool
pub fn is_mptr(self, db: &dyn MirDb) -> bool
pub fn is_sptr(self, db: &dyn MirDb) -> bool
pub fn is_map(self, db: &dyn MirDb) -> bool
pub fn is_contract(self, db: &dyn MirDb) -> bool
pub fn array_elem_size(self, db: &dyn MirDb, slot_size: usize) -> usize
pub fn print<W: Write>(&self, db: &dyn MirDb, w: &mut W) -> Result
pub fn as_string(&self, db: &dyn MirDb) -> String
Trait Implementations§
Source§impl InternKey for TypeId
impl InternKey for TypeId
Source§fn from_intern_id(v: InternId) -> Self
fn from_intern_id(v: InternId) -> Self
Create an instance of the intern-key from a
u32
value.Source§fn as_intern_id(&self) -> InternId
fn as_intern_id(&self) -> InternId
Extract the
u32
with which the intern-key was created.Source§impl PrettyPrint for TypeId
impl PrettyPrint for TypeId
fn pretty_print<W: Write>( &self, db: &dyn MirDb, _store: &BodyDataStore, w: &mut W, ) -> Result
fn pretty_string(&self, db: &dyn MirDb, store: &BodyDataStore) -> String
impl Copy for TypeId
impl Eq for TypeId
impl StructuralPartialEq for TypeId
Auto Trait Implementations§
impl Freeze for TypeId
impl RefUnwindSafe for TypeId
impl Send for TypeId
impl Sync for TypeId
impl Unpin for TypeId
impl UnwindSafe for TypeId
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<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.