pub struct Type { /* private fields */ }
Expand description
A wrapper around a LLVMTypeRef
for a specific context
Implementations§
Source§impl Type
impl Type
Sourcepub fn function(&self, params: Vec<Type>, va_args: bool) -> Type
pub fn function(&self, params: Vec<Type>, va_args: bool) -> Type
Creates a function that returns this type
Sourcepub fn struct_set_body(&self, elements: Vec<Type>, packed: bool)
pub fn struct_set_body(&self, elements: Vec<Type>, packed: bool)
Set the body of a struct
Sourcepub fn const_signed_int(&self, val: i64) -> Value
pub fn const_signed_int(&self, val: i64) -> Value
An integer constant of this type
Sourcepub fn const_real(&self, val: f64) -> Value
pub fn const_real(&self, val: f64) -> Value
A real constant of this type
Sourcepub fn const_struct(&self, elements: Vec<Value>) -> Value
pub fn const_struct(&self, elements: Vec<Value>) -> Value
A constant named struct with the given elements
Sourcepub fn const_array(&self, elements: Vec<Value>) -> Value
pub fn const_array(&self, elements: Vec<Value>) -> Value
A constant array with the given elements
Sourcepub fn inner(&self) -> LLVMTypeRef
pub fn inner(&self) -> LLVMTypeRef
Returns the internal type reference
Trait Implementations§
impl Copy 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