Struct rustc_const_eval::interpret::operand::ImmTy
source · pub struct ImmTy<'tcx, Prov: Provenance = AllocId> {
imm: Immediate<Prov>,
pub layout: TyAndLayout<'tcx>,
}
Fields
imm: Immediate<Prov>
layout: TyAndLayout<'tcx>
Implementations
sourceimpl<'tcx, Prov: Provenance> ImmTy<'tcx, Prov>
impl<'tcx, Prov: Provenance> ImmTy<'tcx, Prov>
pub fn from_scalar(val: Scalar<Prov>, layout: TyAndLayout<'tcx>) -> Self
pub fn from_immediate(imm: Immediate<Prov>, layout: TyAndLayout<'tcx>) -> Self
pub fn uninit(layout: TyAndLayout<'tcx>) -> Self
pub fn try_from_uint(
i: impl Into<u128>,
layout: TyAndLayout<'tcx>
) -> Option<Self>
pub fn from_uint(i: impl Into<u128>, layout: TyAndLayout<'tcx>) -> Self
pub fn try_from_int(
i: impl Into<i128>,
layout: TyAndLayout<'tcx>
) -> Option<Self>
pub fn from_int(i: impl Into<i128>, layout: TyAndLayout<'tcx>) -> Self
pub fn to_const_int(self) -> ConstInt
Trait Implementations
sourceimpl<'tcx, Prov: Clone + Provenance> Clone for ImmTy<'tcx, Prov>
impl<'tcx, Prov: Clone + Provenance> Clone for ImmTy<'tcx, Prov>
sourceimpl<'tcx, Prov: Debug + Provenance> Debug for ImmTy<'tcx, Prov>
impl<'tcx, Prov: Debug + Provenance> Debug for ImmTy<'tcx, Prov>
sourceimpl<'tcx, Prov: Provenance> Deref for ImmTy<'tcx, Prov>
impl<'tcx, Prov: Provenance> Deref for ImmTy<'tcx, Prov>
sourceimpl<Prov: Provenance> Display for ImmTy<'_, Prov>
impl<Prov: Provenance> Display for ImmTy<'_, Prov>
Auto Trait Implementations
impl<'tcx, Prov = AllocId> !RefUnwindSafe for ImmTy<'tcx, Prov>
impl<'tcx, Prov> Send for ImmTy<'tcx, Prov>where
Prov: Send,
impl<'tcx, Prov> Sync for ImmTy<'tcx, Prov>where
Prov: Sync,
impl<'tcx, Prov> Unpin for ImmTy<'tcx, Prov>where
Prov: Unpin,
impl<'tcx, Prov = AllocId> !UnwindSafe for ImmTy<'tcx, Prov>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.