pub enum ConversionOp {
Show 13 variants
Trunc {
value: Operand,
target_ty: TypeIdx,
},
ZExt {
value: Operand,
target_ty: TypeIdx,
},
SExt {
value: Operand,
target_ty: TypeIdx,
},
FPTrunc {
value: Operand,
target_ty: TypeIdx,
},
FPExt {
value: Operand,
target_ty: TypeIdx,
},
FPToUI {
value: Operand,
target_ty: TypeIdx,
},
FPToSI {
value: Operand,
target_ty: TypeIdx,
},
UIToFP {
value: Operand,
target_ty: TypeIdx,
},
SIToFP {
value: Operand,
target_ty: TypeIdx,
},
PtrToInt {
value: Operand,
target_ty: TypeIdx,
},
IntToPtr {
value: Operand,
target_ty: TypeIdx,
},
Bitcast {
value: Operand,
target_ty: TypeIdx,
},
AddrSpaceCast {
value: Operand,
target_ty: TypeIdx,
},
}Expand description
Type conversion/casting operations.
Variants§
Trunc
Truncate integer to smaller type.
ZExt
Zero extend integer to larger type.
SExt
Sign extend integer to larger type.
FPTrunc
Truncate floating-point to smaller type.
FPExt
Extend floating-point to larger type.
FPToUI
Convert floating-point to unsigned integer.
FPToSI
Convert floating-point to signed integer.
UIToFP
Convert unsigned integer to floating-point.
SIToFP
Convert signed integer to floating-point.
PtrToInt
Convert pointer to integer.
IntToPtr
Convert integer to pointer.
Bitcast
Bitwise reinterpretation (same bit width required).
AddrSpaceCast
Cast pointer to different address space.
Trait Implementations§
Source§impl Clone for ConversionOp
impl Clone for ConversionOp
Source§fn clone(&self) -> ConversionOp
fn clone(&self) -> ConversionOp
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ConversionOp
impl RefUnwindSafe for ConversionOp
impl Send for ConversionOp
impl Sync for ConversionOp
impl Unpin for ConversionOp
impl UnwindSafe for ConversionOp
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