Enum inkwell::values::BasicValueEnum
source · pub enum BasicValueEnum<'ctx> {
ArrayValue(ArrayValue<'ctx>),
IntValue(IntValue<'ctx>),
FloatValue(FloatValue<'ctx>),
PointerValue(PointerValue<'ctx>),
StructValue(StructValue<'ctx>),
VectorValue(VectorValue<'ctx>),
}
Variants§
ArrayValue(ArrayValue<'ctx>)
IntValue(IntValue<'ctx>)
FloatValue(FloatValue<'ctx>)
PointerValue(PointerValue<'ctx>)
StructValue(StructValue<'ctx>)
VectorValue(VectorValue<'ctx>)
Implementations§
source§impl<'ctx> BasicValueEnum<'ctx>
impl<'ctx> BasicValueEnum<'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) -> BasicTypeEnum<'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_pointer_value(self) -> bool
pub fn is_struct_value(self) -> bool
pub fn is_vector_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_pointer_value(self) -> PointerValue<'ctx>
pub fn into_struct_value(self) -> StructValue<'ctx>
pub fn into_vector_value(self) -> VectorValue<'ctx>
Trait Implementations§
source§impl<'ctx> AnyValue<'ctx> for BasicValueEnum<'ctx>
impl<'ctx> AnyValue<'ctx> for BasicValueEnum<'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 BasicValueEnum<'_>
impl AsValueRef for BasicValueEnum<'_>
fn as_value_ref(&self) -> LLVMValueRef
source§impl<'ctx> BasicValue<'ctx> for BasicValueEnum<'ctx>
impl<'ctx> BasicValue<'ctx> for BasicValueEnum<'ctx>
source§fn as_basic_value_enum(&self) -> BasicValueEnum<'ctx>
fn as_basic_value_enum(&self) -> BasicValueEnum<'ctx>
Returns an enum containing a typed version of the
BasicValue
.source§fn as_instruction_value(&self) -> Option<InstructionValue<'ctx>>
fn as_instruction_value(&self) -> Option<InstructionValue<'ctx>>
Most
BasicValue
s are the byproduct of an instruction
and so are convertible into an InstructionValue
fn get_first_use(&self) -> Option<BasicValueUse<'_>>
source§impl<'ctx> Clone for BasicValueEnum<'ctx>
impl<'ctx> Clone for BasicValueEnum<'ctx>
source§fn clone(&self) -> BasicValueEnum<'ctx>
fn clone(&self) -> BasicValueEnum<'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 BasicValueEnum<'ctx>
impl<'ctx> Debug for BasicValueEnum<'ctx>
source§impl Display for BasicValueEnum<'_>
impl Display for BasicValueEnum<'_>
source§impl<'ctx> From<ArrayValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> From<ArrayValue<'ctx>> for BasicValueEnum<'ctx>
source§fn from(value: ArrayValue<'_>) -> BasicValueEnum<'_>
fn from(value: ArrayValue<'_>) -> BasicValueEnum<'_>
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<BasicValueEnum<'ctx>> for BasicMetadataValueEnum<'ctx>
impl<'ctx> From<BasicValueEnum<'ctx>> for BasicMetadataValueEnum<'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 BasicValueEnum<'ctx>
impl<'ctx> From<FloatValue<'ctx>> for BasicValueEnum<'ctx>
source§fn from(value: FloatValue<'_>) -> BasicValueEnum<'_>
fn from(value: FloatValue<'_>) -> BasicValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<IntValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> From<IntValue<'ctx>> for BasicValueEnum<'ctx>
source§fn from(value: IntValue<'_>) -> BasicValueEnum<'_>
fn from(value: IntValue<'_>) -> BasicValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<PointerValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> From<PointerValue<'ctx>> for BasicValueEnum<'ctx>
source§fn from(value: PointerValue<'_>) -> BasicValueEnum<'_>
fn from(value: PointerValue<'_>) -> BasicValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<StructValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> From<StructValue<'ctx>> for BasicValueEnum<'ctx>
source§fn from(value: StructValue<'_>) -> BasicValueEnum<'_>
fn from(value: StructValue<'_>) -> BasicValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<VectorValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> From<VectorValue<'ctx>> for BasicValueEnum<'ctx>
source§fn from(value: VectorValue<'_>) -> BasicValueEnum<'_>
fn from(value: VectorValue<'_>) -> BasicValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> Hash for BasicValueEnum<'ctx>
impl<'ctx> Hash for BasicValueEnum<'ctx>
source§impl<'ctx> PartialEq<ArrayValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> PartialEq<ArrayValue<'ctx>> for BasicValueEnum<'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<BasicValueEnum<'ctx>> for ArrayValue<'ctx>
impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for ArrayValue<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for FloatValue<'ctx>
impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for FloatValue<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for IntValue<'ctx>
impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for IntValue<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for PointerValue<'ctx>
impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for PointerValue<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for VectorValue<'ctx>
impl<'ctx> PartialEq<BasicValueEnum<'ctx>> for VectorValue<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<FloatValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> PartialEq<FloatValue<'ctx>> for BasicValueEnum<'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<IntValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> PartialEq<IntValue<'ctx>> for BasicValueEnum<'ctx>
source§impl<'ctx> PartialEq<PointerValue<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> PartialEq<PointerValue<'ctx>> for BasicValueEnum<'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 BasicValueEnum<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for BasicValueEnum<'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 BasicValueEnum<'ctx>
impl<'ctx> PartialEq<VectorValue<'ctx>> for BasicValueEnum<'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 BasicValueEnum<'ctx>
impl<'ctx> PartialEq for BasicValueEnum<'ctx>
source§fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
fn eq(&self, other: &BasicValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> TryFrom<AnyValueEnum<'ctx>> for BasicValueEnum<'ctx>
source§impl<'ctx> TryFrom<BasicMetadataValueEnum<'ctx>> for BasicValueEnum<'ctx>
impl<'ctx> TryFrom<BasicMetadataValueEnum<'ctx>> for BasicValueEnum<'ctx>
source§impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for ArrayValue<'ctx>
impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for ArrayValue<'ctx>
source§impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for FloatValue<'ctx>
impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for FloatValue<'ctx>
source§impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for IntValue<'ctx>
impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for IntValue<'ctx>
source§impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for PointerValue<'ctx>
impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for PointerValue<'ctx>
source§impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for StructValue<'ctx>
source§impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for VectorValue<'ctx>
impl<'ctx> TryFrom<BasicValueEnum<'ctx>> for VectorValue<'ctx>
impl<'ctx> Copy for BasicValueEnum<'ctx>
impl<'ctx> Eq for BasicValueEnum<'ctx>
impl<'ctx> StructuralPartialEq for BasicValueEnum<'ctx>
Auto Trait Implementations§
impl<'ctx> RefUnwindSafe for BasicValueEnum<'ctx>
impl<'ctx> !Send for BasicValueEnum<'ctx>
impl<'ctx> !Sync for BasicValueEnum<'ctx>
impl<'ctx> Unpin for BasicValueEnum<'ctx>
impl<'ctx> UnwindSafe for BasicValueEnum<'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