Enum inkwell::values::AggregateValueEnum
source · pub enum AggregateValueEnum<'ctx> {
ArrayValue(ArrayValue<'ctx>),
StructValue(StructValue<'ctx>),
}
Variants§
ArrayValue(ArrayValue<'ctx>)
StructValue(StructValue<'ctx>)
Implementations§
source§impl<'ctx> AggregateValueEnum<'ctx>
impl<'ctx> AggregateValueEnum<'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 aggregate type enum options (LLVMTypeKind).
pub fn is_array_value(self) -> bool
pub fn is_struct_value(self) -> bool
pub fn into_array_value(self) -> ArrayValue<'ctx>
pub fn into_struct_value(self) -> StructValue<'ctx>
Trait Implementations§
source§impl<'ctx> AggregateValue<'ctx> for AggregateValueEnum<'ctx>
impl<'ctx> AggregateValue<'ctx> for AggregateValueEnum<'ctx>
source§fn as_aggregate_value_enum(&self) -> AggregateValueEnum<'ctx>
fn as_aggregate_value_enum(&self) -> AggregateValueEnum<'ctx>
Returns an enum containing a typed version of the
AggregateValue
.source§impl<'ctx> AnyValue<'ctx> for AggregateValueEnum<'ctx>
impl<'ctx> AnyValue<'ctx> for AggregateValueEnum<'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 AggregateValueEnum<'_>
impl AsValueRef for AggregateValueEnum<'_>
fn as_value_ref(&self) -> LLVMValueRef
source§impl<'ctx> BasicValue<'ctx> for AggregateValueEnum<'ctx>
impl<'ctx> BasicValue<'ctx> for AggregateValueEnum<'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 AggregateValueEnum<'ctx>
impl<'ctx> Clone for AggregateValueEnum<'ctx>
source§fn clone(&self) -> AggregateValueEnum<'ctx>
fn clone(&self) -> AggregateValueEnum<'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 AggregateValueEnum<'ctx>
impl<'ctx> Debug for AggregateValueEnum<'ctx>
source§impl Display for AggregateValueEnum<'_>
impl Display for AggregateValueEnum<'_>
source§impl<'ctx> From<ArrayValue<'ctx>> for AggregateValueEnum<'ctx>
impl<'ctx> From<ArrayValue<'ctx>> for AggregateValueEnum<'ctx>
source§fn from(value: ArrayValue<'_>) -> AggregateValueEnum<'_>
fn from(value: ArrayValue<'_>) -> AggregateValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> From<StructValue<'ctx>> for AggregateValueEnum<'ctx>
impl<'ctx> From<StructValue<'ctx>> for AggregateValueEnum<'ctx>
source§fn from(value: StructValue<'_>) -> AggregateValueEnum<'_>
fn from(value: StructValue<'_>) -> AggregateValueEnum<'_>
Converts to this type from the input type.
source§impl<'ctx> Hash for AggregateValueEnum<'ctx>
impl<'ctx> Hash for AggregateValueEnum<'ctx>
source§impl<'ctx> PartialEq<AggregateValueEnum<'ctx>> for ArrayValue<'ctx>
impl<'ctx> PartialEq<AggregateValueEnum<'ctx>> for ArrayValue<'ctx>
source§fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<AggregateValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> PartialEq<AggregateValueEnum<'ctx>> for StructValue<'ctx>
source§fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> PartialEq<ArrayValue<'ctx>> for AggregateValueEnum<'ctx>
impl<'ctx> PartialEq<ArrayValue<'ctx>> for AggregateValueEnum<'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<StructValue<'ctx>> for AggregateValueEnum<'ctx>
impl<'ctx> PartialEq<StructValue<'ctx>> for AggregateValueEnum<'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 for AggregateValueEnum<'ctx>
impl<'ctx> PartialEq for AggregateValueEnum<'ctx>
source§fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
fn eq(&self, other: &AggregateValueEnum<'ctx>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'ctx> TryFrom<AggregateValueEnum<'ctx>> for ArrayValue<'ctx>
impl<'ctx> TryFrom<AggregateValueEnum<'ctx>> for ArrayValue<'ctx>
source§impl<'ctx> TryFrom<AggregateValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> TryFrom<AggregateValueEnum<'ctx>> for StructValue<'ctx>
impl<'ctx> Copy for AggregateValueEnum<'ctx>
impl<'ctx> Eq for AggregateValueEnum<'ctx>
impl<'ctx> StructuralEq for AggregateValueEnum<'ctx>
impl<'ctx> StructuralPartialEq for AggregateValueEnum<'ctx>
Auto Trait Implementations§
impl<'ctx> RefUnwindSafe for AggregateValueEnum<'ctx>
impl<'ctx> !Send for AggregateValueEnum<'ctx>
impl<'ctx> !Sync for AggregateValueEnum<'ctx>
impl<'ctx> Unpin for AggregateValueEnum<'ctx>
impl<'ctx> UnwindSafe for AggregateValueEnum<'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