pub struct Type(pub Index);
Tuple Fields§
§0: Index
Implementations§
source§impl Type
impl Type
sourcepub fn get_type(context: &Context, t: &TypeContent) -> Option<Type>
pub fn get_type(context: &Context, t: &TypeContent) -> Option<Type>
Get Type if it already exists.
pub fn create_basic_types(context: &mut Context)
sourcepub fn get_content<'a>(&self, context: &'a Context) -> &'a TypeContent
pub fn get_content<'a>(&self, context: &'a Context) -> &'a TypeContent
Get the content for this Type.
sourcepub fn get_uint32(context: &Context) -> Type
pub fn get_uint32(context: &Context) -> Type
New u32 type
sourcepub fn get_uint64(context: &Context) -> Type
pub fn get_uint64(context: &Context) -> Type
New u64 type
sourcepub fn new_string(context: &mut Context, len: u64) -> Type
pub fn new_string(context: &mut Context, len: u64) -> Type
Get string type
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.
PartialEq
does not take into account the special case for Unions below.
sourcepub fn is_uint_of(&self, context: &Context, width: u8) -> bool
pub fn is_uint_of(&self, context: &Context, width: u8) -> bool
Is unsigned integer type of specific width
sourcepub fn get_uint_width(&self, context: &Context) -> Option<u8>
pub fn get_uint_width(&self, context: &Context) -> Option<u8>
Get width of an integer type.
sourcepub fn get_indexed_type(&self, context: &Context, indices: &[u64]) -> Option<Type>
pub fn get_indexed_type(&self, context: &Context, indices: &[u64]) -> Option<Type>
What’s the type of the struct value indexed by indices.
pub fn get_field_type(&self, context: &Context, idx: u64) -> Option<Type>
sourcepub fn get_array_elem_type(&self, context: &Context) -> Option<Type>
pub fn get_array_elem_type(&self, context: &Context) -> Option<Type>
Get the type of the array element, if applicable.
sourcepub fn get_array_len(&self, context: &Context) -> Option<u64>
pub fn get_array_len(&self, context: &Context) -> Option<u64>
Get the length of the array , if applicable.
sourcepub fn get_string_len(&self, context: &Context) -> Option<u64>
pub fn get_string_len(&self, context: &Context) -> Option<u64>
Get the length of a string