Struct llvm::FunctionType [] [src]

pub struct FunctionType;

A function signature type.

Methods

impl FunctionType
[src]

fn new<'a>(ret: &'a Type, args: &[&'a Type]) -> &'a FunctionType

Make a new function signature with the return type and arguments given.

fn num_params(&self) -> usize

Returns the number of parameters this signature takes.

fn get_params(&self) -> Vec<&Type>

Returns a vector of this signature's parameters' types.

fn get_return(&self) -> &Type

Returns the type that this function returns.

Methods from Deref<Target=Type>

fn is_sized(&self) -> bool

Returns true if the size of the type is known at compile-time.

This is equivalent to the type implementing Sized in Rust

fn is_function(&self) -> bool

Returns true if this type is a function.

This is equivalent to FunctionType::is.

fn is_struct(&self) -> bool

Returns true if this type is a struct.

This is equivalent to StructType::is.

fn is_void(&self) -> bool

Returns true if this type is void.

fn is_pointer(&self) -> bool

Returns true if this type is a pointer.

This is equivalent to PointerType::is.

fn is_integer(&self) -> bool

Returns true if this type is an integer.

fn is_float(&self) -> bool

Returns true if this type is any floating-point number.

fn get_size(&self, target: &TargetData) -> usize

Returns the size of the type in bytes.

Trait Implementations

impl Eq for FunctionType
[src]

impl PartialEq<FunctionType> for FunctionType
[src]

fn eq(&self, other: &FunctionType) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl<'a> PartialEq<FunctionType> for &'a FunctionType
[src]

fn eq(&self, other: &FunctionType) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl<'a> From<LLVMTypeRef> for &'a FunctionType
[src]

fn from(ty: LLVMTypeRef) -> &'a FunctionType

Performs the conversion.

impl<'a> From<LLVMTypeRef> for &'a mut FunctionType
[src]

fn from(ty: LLVMTypeRef) -> &'a mut FunctionType

Performs the conversion.

impl GetContext for FunctionType
[src]

fn get_context(&self) -> &Context

Returns a reference to the context that owns this value. Read more

impl Debug for FunctionType
[src]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Deref for FunctionType
[src]

type Target = Type

The resulting type after dereferencing

fn deref(&self) -> &Type

The method called to dereference a value

impl Sub<Type> for FunctionType
[src]

fn is(ty: &Type) -> bool

Check if the given super value is an instance of this type.

fn from_super(c: &T) -> Option<&Self>

Attempt to cast the given super value into an instance of this type.

fn to_super(&self) -> &T

Cast this value to a super value.