Enum inkwell::values::AnyValueEnum
source · 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>
impl<'ctx> AnyValueEnum<'ctx>
sourcepub unsafe fn new(value: LLVMValueRef) -> Self
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).
pub fn get_type(&self) -> AnyTypeEnum<'ctx>
pub fn is_array_value(self) -> bool
pub fn is_int_value(self) -> bool
pub fn is_float_value(self) -> bool
pub fn is_phi_value(self) -> bool
pub fn is_function_value(self) -> bool
pub fn is_pointer_value(self) -> bool
pub fn is_struct_value(self) -> bool
pub fn is_vector_value(self) -> bool
pub fn is_instruction_value(self) -> bool
pub fn into_array_value(self) -> ArrayValue<'ctx>
pub fn into_int_value(self) -> IntValue<'ctx>
pub fn into_float_value(self) -> FloatValue<'ctx>
pub fn into_phi_value(self) -> PhiValue<'ctx>
pub fn into_function_value(self) -> FunctionValue<'ctx>
pub fn into_pointer_value(self) -> PointerValue<'ctx>
pub fn into_struct_value(self) -> StructValue<'ctx>
pub fn into_vector_value(self) -> VectorValue<'ctx>
pub fn into_instruction_value(self) -> InstructionValue<'ctx>
Trait Implementations§
source§impl<'ctx> AnyValue<'ctx> for AnyValueEnum<'ctx>
impl<'ctx> AnyValue<'ctx> for AnyValueEnum<'ctx>
source§fn as_any_value_enum(&self) -> AnyValueEnum<'ctx>
fn as_any_value_enum(&self) -> AnyValueEnum<'ctx>
Returns an enum containing a typed version of
AnyValue
.source§fn print_to_string(&self) -> LLVMString
fn print_to_string(&self) -> LLVMString
Prints a value to a
LLVMString
source§impl AsValueRef for AnyValueEnum<'_>
impl AsValueRef for AnyValueEnum<'_>
fn as_value_ref(&self) -> LLVMValueRef
source§impl<'ctx> Clone for AnyValueEnum<'ctx>
impl<'ctx> Clone for AnyValueEnum<'ctx>
source§fn clone(&self) -> AnyValueEnum<'ctx>
fn clone(&self) -> AnyValueEnum<'ctx>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'ctx> Debug for AnyValueEnum<'ctx>
impl<'ctx> Debug for AnyValueEnum<'ctx>
source§impl Display for AnyValueEnum<'_>
impl Display for AnyValueEnum<'_>
source§impl<'ctx> From<ArrayValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<ArrayValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: ArrayValue<'_>) -> AnyValueEnum<'_>
fn from(value: ArrayValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<BasicValueEnum<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<BasicValueEnum<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: BasicValueEnum<'ctx>) -> Self
fn from(value: BasicValueEnum<'ctx>) -> Self
Converts to this type from the input type.
source§impl<'ctx> From<FloatValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<FloatValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: FloatValue<'_>) -> AnyValueEnum<'_>
fn from(value: FloatValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<FunctionValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<FunctionValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: FunctionValue<'_>) -> AnyValueEnum<'_>
fn from(value: FunctionValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<InstructionValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<InstructionValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: InstructionValue<'_>) -> AnyValueEnum<'_>
fn from(value: InstructionValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<IntValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<IntValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: IntValue<'_>) -> AnyValueEnum<'_>
fn from(value: IntValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<MetadataValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<MetadataValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: MetadataValue<'_>) -> AnyValueEnum<'_>
fn from(value: MetadataValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<PhiValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<PhiValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: PhiValue<'_>) -> AnyValueEnum<'_>
fn from(value: PhiValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<PointerValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<PointerValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: PointerValue<'_>) -> AnyValueEnum<'_>
fn from(value: PointerValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<StructValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<StructValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: StructValue<'_>) -> AnyValueEnum<'_>
fn from(value: StructValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<VectorValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> From<VectorValue<'ctx>> for AnyValueEnum<'ctx>
source§fn from(value: VectorValue<'_>) -> AnyValueEnum<'_>
fn from(value: VectorValue<'_>) -> AnyValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> Hash for AnyValueEnum<'ctx>
impl<'ctx> Hash for AnyValueEnum<'ctx>
source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for ArrayValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for ArrayValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for FloatValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for FloatValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for FunctionValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for FunctionValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for InstructionValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for InstructionValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for IntValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for IntValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for MetadataValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for MetadataValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PhiValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PhiValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PointerValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for PointerValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for VectorValue<'ctx>
impl<'ctx> PartialEq<AnyValueEnum<'ctx>> for VectorValue<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<ArrayValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<ArrayValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &ArrayValue<'ctx>) -> bool
fn eq(&self, other: &ArrayValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<FloatValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<FloatValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &FloatValue<'ctx>) -> bool
fn eq(&self, other: &FloatValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<FunctionValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<FunctionValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &FunctionValue<'ctx>) -> bool
fn eq(&self, other: &FunctionValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<InstructionValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<InstructionValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &InstructionValue<'ctx>) -> bool
fn eq(&self, other: &InstructionValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<IntValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<IntValue<'ctx>> for AnyValueEnum<'ctx>
source§impl<'ctx> PartialEq<MetadataValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<MetadataValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &MetadataValue<'ctx>) -> bool
fn eq(&self, other: &MetadataValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<PhiValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<PhiValue<'ctx>> for AnyValueEnum<'ctx>
source§impl<'ctx> PartialEq<PointerValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<PointerValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &PointerValue<'ctx>) -> bool
fn eq(&self, other: &PointerValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<StructValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &StructValue<'ctx>) -> bool
fn eq(&self, other: &StructValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<VectorValue<'ctx>> for AnyValueEnum<'ctx>
impl<'ctx> PartialEq<VectorValue<'ctx>> for AnyValueEnum<'ctx>
source§fn eq(&self, other: &VectorValue<'ctx>) -> bool
fn eq(&self, other: &VectorValue<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq for AnyValueEnum<'ctx>
impl<'ctx> PartialEq for AnyValueEnum<'ctx>
source§fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
fn eq(&self, other: &AnyValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for ArrayValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for ArrayValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicMetadataValueEnum<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicMetadataValueEnum<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicValueEnum<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for FloatValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for FloatValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for FunctionValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for FunctionValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for InstructionValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for InstructionValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for IntValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for IntValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for MetadataValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for MetadataValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PhiValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PhiValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PointerValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for PointerValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for StructValue<'ctx>
source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for VectorValue<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for VectorValue<'ctx>
impl<'ctx> Copy for AnyValueEnum<'ctx>
impl<'ctx> Eq for AnyValueEnum<'ctx>
impl<'ctx> StructuralPartialEq for AnyValueEnum<'ctx>
Auto Trait Implementations§
impl<'ctx> Freeze for AnyValueEnum<'ctx>
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> 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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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