Trait llvm::GenericValueCast
[−]
[src]
pub trait GenericValueCast<'a> { fn to_generic(self, context: &'a Context) -> GenericValue<'a>; fn from_generic(value: GenericValue<'a>, context: &'a Context) -> Self; }
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
fn to_generic(self, context: &'a Context) -> GenericValue<'a>
Create a GenericValue
from this value.
fn from_generic(value: GenericValue<'a>, context: &'a Context) -> Self
Convert the GenericValue
into a value of this type again.
Implementors
impl<'a> GenericValueCast<'a> for f64
impl<'a> GenericValueCast<'a> for f32
impl<'a> GenericValueCast<'a> for bool
impl<'a> GenericValueCast<'a> for i8
impl<'a> GenericValueCast<'a> for u8
impl<'a> GenericValueCast<'a> for i16
impl<'a> GenericValueCast<'a> for u16
impl<'a> GenericValueCast<'a> for i32
impl<'a> GenericValueCast<'a> for u32
impl<'a> GenericValueCast<'a> for i64
impl<'a> GenericValueCast<'a> for u64