Trait llvm_rs::GenericValueCast
source · pub trait GenericValueCast {
fn to_generic(self, context: &Context) -> CSemiBox<'_, GenericValue>;
fn from_generic(value: &GenericValue, context: &Context) -> Self;
}Expand description
A value that can be cast into a GenericValue and that a GenericValue can be cast into.
Both these methods require contexts because some Type constructors are needed for the
conversion and these constructors need a context.
Required Methods§
sourcefn to_generic(self, context: &Context) -> CSemiBox<'_, GenericValue>
fn to_generic(self, context: &Context) -> CSemiBox<'_, GenericValue>
Create a GenericValue from this value.
sourcefn from_generic(value: &GenericValue, context: &Context) -> Self
fn from_generic(value: &GenericValue, context: &Context) -> Self
Convert the GenericValue into a value of this type again.