Struct rustc_const_eval::interpret::ImmTy
source · [−]pub struct ImmTy<'tcx, Tag: Provenance = AllocId> {
imm: Immediate<Tag>,
pub layout: TyAndLayout<'tcx>,
}Fields
imm: Immediate<Tag>layout: TyAndLayout<'tcx>Implementations
sourceimpl<'tcx, Tag: Provenance> ImmTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> ImmTy<'tcx, Tag>
pub fn from_scalar(val: Scalar<Tag>, layout: TyAndLayout<'tcx>) -> Self
pub fn from_immediate(imm: Immediate<Tag>, 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, Tag: Clone + Provenance> Clone for ImmTy<'tcx, Tag>
impl<'tcx, Tag: Clone + Provenance> Clone for ImmTy<'tcx, Tag>
sourceimpl<'tcx, Tag: Debug + Provenance> Debug for ImmTy<'tcx, Tag>
impl<'tcx, Tag: Debug + Provenance> Debug for ImmTy<'tcx, Tag>
sourceimpl<'tcx, Tag: Provenance> Deref for ImmTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> Deref for ImmTy<'tcx, Tag>
sourceimpl<Tag: Provenance> Display for ImmTy<'_, Tag>
impl<Tag: Provenance> Display for ImmTy<'_, Tag>
sourceimpl<'tcx, Tag: Provenance> From<ImmTy<'tcx, Tag>> for OpTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> From<ImmTy<'tcx, Tag>> for OpTy<'tcx, Tag>
impl<'tcx, Tag: Copy + Provenance> Copy for ImmTy<'tcx, Tag>
Auto Trait Implementations
impl<'tcx, Tag = AllocId> !RefUnwindSafe for ImmTy<'tcx, Tag>
impl<'tcx, Tag> Send for ImmTy<'tcx, Tag> where
Tag: Send,
impl<'tcx, Tag> Sync for ImmTy<'tcx, Tag> where
Tag: Sync,
impl<'tcx, Tag> Unpin for ImmTy<'tcx, Tag> where
Tag: Unpin,
impl<'tcx, Tag = AllocId> !UnwindSafe for ImmTy<'tcx, Tag>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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.