pub enum AnyValueEnum<'ctx> {
    ArrayValue(ArrayValue<'ctx>),
    IntValue(IntValue<'ctx>),
    FloatValue(FloatValue<'ctx>),
    PhiValue(PhiValue<'ctx>),
    FunctionValue(FunctionValue<'ctx>),
    PointerValue(PointerValue<'ctx>),
    StructValue(StructValue<'ctx>),
    VectorValue(VectorValue<'ctx>),
    InstructionValue(InstructionValue<'ctx>),
    MetadataValue(MetadataValue<'ctx>),
}

Variants§

§

ArrayValue(ArrayValue<'ctx>)

§

IntValue(IntValue<'ctx>)

§

FloatValue(FloatValue<'ctx>)

§

PhiValue(PhiValue<'ctx>)

§

FunctionValue(FunctionValue<'ctx>)

§

PointerValue(PointerValue<'ctx>)

§

StructValue(StructValue<'ctx>)

§

VectorValue(VectorValue<'ctx>)

§

InstructionValue(InstructionValue<'ctx>)

§

MetadataValue(MetadataValue<'ctx>)

Implementations§

source§

impl<'ctx> AnyValueEnum<'ctx>

source

pub unsafe fn new(value: LLVMValueRef) -> Self

Get a value from an LLVMValueRef.

§Safety

The ref must be valid and of supported enum type options (LLVMTypeKind).

source

pub fn get_type(&self) -> AnyTypeEnum<'ctx>

source

pub fn is_array_value(self) -> bool

source

pub fn is_int_value(self) -> bool

source

pub fn is_float_value(self) -> bool

source

pub fn is_phi_value(self) -> bool

source

pub fn is_function_value(self) -> bool

source

pub fn is_pointer_value(self) -> bool

source

pub fn is_struct_value(self) -> bool

source

pub fn is_vector_value(self) -> bool

source

pub fn is_instruction_value(self) -> bool

source

pub fn into_array_value(self) -> ArrayValue<'ctx>

source

pub fn into_int_value(self) -> IntValue<'ctx>

source

pub fn into_float_value(self) -> FloatValue<'ctx>

source

pub fn into_phi_value(self) -> PhiValue<'ctx>

source

pub fn into_function_value(self) -> FunctionValue<'ctx>

source

pub fn into_pointer_value(self) -> PointerValue<'ctx>

source

pub fn into_struct_value(self) -> StructValue<'ctx>

source

pub fn into_vector_value(self) -> VectorValue<'ctx>

source

pub fn into_instruction_value(self) -> InstructionValue<'ctx>

Trait Implementations§

source§

impl<'ctx> AnyValue<'ctx> for AnyValueEnum<'ctx>

source§

fn as_any_value_enum(&self) -> AnyValueEnum<'ctx>

Returns an enum containing a typed version of AnyValue.
source§

fn print_to_string(&self) -> LLVMString

Prints a value to a LLVMString
source§

fn is_poison(&self) -> bool

Returns whether the value is poison
source§

impl AsValueRef for AnyValueEnum<'_>

source§

impl<'ctx> Clone for AnyValueEnum<'ctx>

source§

fn clone(&self) -> AnyValueEnum<'ctx>

Returns a copy 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<'ctx> Debug for AnyValueEnum<'ctx>

source§

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

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

impl Display for AnyValueEnum<'_>

source§

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

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

impl<'ctx> From<ArrayValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: ArrayValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<BasicValueEnum<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: BasicValueEnum<'ctx>) -> Self

Converts to this type from the input type.
source§

impl<'ctx> From<FloatValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: FloatValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<FunctionValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: FunctionValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<InstructionValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: InstructionValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<IntValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: IntValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<MetadataValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: MetadataValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<PhiValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: PhiValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<PointerValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: PointerValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<StructValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: StructValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> From<VectorValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn from(value: VectorValue<'_>) -> AnyValueEnum<'_>

Converts to this type from the input type.
source§

impl<'ctx> Hash for AnyValueEnum<'ctx>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for ArrayValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for FloatValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for FunctionValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for InstructionValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for IntValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for MetadataValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PhiValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PointerValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for StructValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for VectorValue<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<ArrayValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &ArrayValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<FloatValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &FloatValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<FunctionValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &FunctionValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<InstructionValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &InstructionValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<IntValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &IntValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<MetadataValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &MetadataValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<PhiValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &PhiValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<PointerValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &PointerValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<StructValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &StructValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq<VectorValue<'ctx>> for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &VectorValue<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> PartialEq for AnyValueEnum<'ctx>

source§

fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for ArrayValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicMetadataValueEnum<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicValueEnum<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for FloatValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for FunctionValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for InstructionValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for IntValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for MetadataValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PhiValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PointerValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for StructValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for VectorValue<'ctx>

§

type Error = ()

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

fn try_from(value: AnyValueEnum<'ctx>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'ctx> Copy for AnyValueEnum<'ctx>

source§

impl<'ctx> Eq for AnyValueEnum<'ctx>

source§

impl<'ctx> StructuralPartialEq for AnyValueEnum<'ctx>

Auto Trait Implementations§

§

impl<'ctx> RefUnwindSafe for AnyValueEnum<'ctx>

§

impl<'ctx> !Send for AnyValueEnum<'ctx>

§

impl<'ctx> !Sync for AnyValueEnum<'ctx>

§

impl<'ctx> Unpin for AnyValueEnum<'ctx>

§

impl<'ctx> UnwindSafe for AnyValueEnum<'ctx>

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> 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

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

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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.