pub enum Type {
Unit,
Bool,
Uint(u8),
B256,
String(u64),
Array(Aggregate),
Union(Aggregate),
Struct(Aggregate),
Pointer(Pointer),
}
Variants
Unit
Bool
Uint(u8)
B256
String(u64)
Array(Aggregate)
Union(Aggregate)
Struct(Aggregate)
Pointer(Pointer)
Implementations
sourceimpl Type
impl Type
sourcepub fn is_copy_type(&self) -> bool
pub fn is_copy_type(&self) -> bool
Return whether this is a ‘copy’ type, one whose value will always fit in a register.
sourcepub fn as_string(&self, context: &Context) -> String
pub fn as_string(&self, context: &Context) -> String
Return a string representation of type, used for printing.
sourcepub fn eq(&self, context: &Context, other: &Type) -> bool
pub fn eq(&self, context: &Context, other: &Type) -> bool
Compare a type to this one for equivalence. We’re unable to use PartialEq
as we need the
Context
to compare structs and arrays.
pub fn strip_ptr_type(&self, context: &Context) -> Type
sourcepub fn get_inner_ptr_type(&self, context: &Context) -> Option<Type>
pub fn get_inner_ptr_type(&self, context: &Context) -> Option<Type>
Gets the inner pointer type if its a pointer.
sourcepub fn is_ptr_type(&self) -> bool
pub fn is_ptr_type(&self) -> bool
Returns true if this is a pointer type.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more