Enum LLVMValue

Source
pub enum LLVMValue {
Show 15 variants String(LLVMValueRef), Bool(BoolValue), Int8(Int8Value), Int16(Int16Value), Int32(Int32Value), Int64(Int64Value), Float(FloatValue), Double(DoubleValue), Pointer(PointerValue), Array(ArrayValue), Struct(StructValue), Function(FunctionValue), Reference(ReferenceValue), EnumVariant(EnumVariantValue), Unit,
}

Variants§

Implementations§

Source§

impl LLVMValue

Source

pub fn id(&self) -> i32

Source

pub fn as_llvm_value_ref(&self) -> LLVMValueRef

Source

pub fn as_int32(&self) -> Option<&Int32Value>

Source

pub fn as_bool(&self) -> Option<&BoolValue>

Source

pub fn is_float(&self) -> bool

Source

pub fn is_double(&self) -> bool

Source

pub fn as_float(&self) -> Option<&FloatValue>

Source

pub fn as_double(&self) -> Option<&DoubleValue>

Source

pub fn as_reference(&self) -> Option<&ReferenceValue>

Source

pub fn as_array(&self) -> Option<&ArrayValue>

Source

pub fn as_pointer(&self) -> Option<&PointerValue>

Source

pub fn as_struct(&self) -> Option<&StructValue>

Source

pub fn as_function(&self) -> Option<FunctionValue>

Source

pub fn is_reference(&self) -> bool

Source

pub fn is_struct(&self) -> bool

Source

pub fn is_pointer(&self) -> bool

Source

pub fn is_function(&self) -> bool

Source

pub fn is_array(&self) -> bool

Source

pub fn get_llvm_type(&self, ctx: &Context) -> LLVMType

Source

pub fn is_unit(&self) -> bool

Source

pub fn is_undef(&self) -> bool

Trait Implementations§

Source§

impl Clone for LLVMValue

Source§

fn clone(&self) -> LLVMValue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LLVMValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&str> for LLVMValue

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<*mut LLVMValue> for LLVMValue

Source§

fn from(value: LLVMValueRef) -> Self

Converts to this type from the input type.
Source§

impl From<ArrayValue> for LLVMValue

Source§

fn from(value: ArrayValue) -> Self

Converts to this type from the input type.
Source§

impl From<BoolValue> for LLVMValue

Source§

fn from(value: BoolValue) -> Self

Converts to this type from the input type.
Source§

impl From<DoubleValue> for LLVMValue

Source§

fn from(value: DoubleValue) -> Self

Converts to this type from the input type.
Source§

impl From<FloatValue> for LLVMValue

Source§

fn from(value: FloatValue) -> Self

Converts to this type from the input type.
Source§

impl From<FunctionValue> for LLVMValue

Source§

fn from(value: FunctionValue) -> Self

Converts to this type from the input type.
Source§

impl From<Int16Value> for LLVMValue

Source§

fn from(value: Int16Value) -> Self

Converts to this type from the input type.
Source§

impl From<Int32Value> for LLVMValue

Source§

fn from(value: Int32Value) -> Self

Converts to this type from the input type.
Source§

impl From<Int64Value> for LLVMValue

Source§

fn from(value: Int64Value) -> Self

Converts to this type from the input type.
Source§

impl From<Int8Value> for LLVMValue

Source§

fn from(value: Int8Value) -> Self

Converts to this type from the input type.
Source§

impl From<PointerValue> for LLVMValue

Source§

fn from(value: PointerValue) -> Self

Converts to this type from the input type.
Source§

impl From<ReferenceValue> for LLVMValue

Source§

fn from(value: ReferenceValue) -> Self

Converts to this type from the input type.
Source§

impl From<StructValue> for LLVMValue

Source§

fn from(value: StructValue) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.