Struct rustc_mir::interpret::operand::OpTy [−][src]
pub struct OpTy<'tcx, Tag = ()> { op: Operand<Tag>, pub layout: TyAndLayout<'tcx>, }
Fields
op: Operand<Tag>layout: TyAndLayout<'tcx>Implementations
impl<'tcx, Tag: Debug + Copy> OpTy<'tcx, Tag>[src]
impl<'tcx, Tag: Debug + Copy> OpTy<'tcx, Tag>[src]pub fn try_as_mplace(
&self,
cx: &impl HasDataLayout
) -> Result<MPlaceTy<'tcx, Tag>, ImmTy<'tcx, Tag>>[src]
pub fn try_as_mplace(
&self,
cx: &impl HasDataLayout
) -> Result<MPlaceTy<'tcx, Tag>, ImmTy<'tcx, Tag>>[src]Note: do not call as_ref on the resulting place. This function should only be used to
read from the resulting mplace, not to get its address back.
pub fn assert_mem_place(&self, cx: &impl HasDataLayout) -> MPlaceTy<'tcx, Tag>[src]
pub fn assert_mem_place(&self, cx: &impl HasDataLayout) -> MPlaceTy<'tcx, Tag>[src]Note: do not call as_ref on the resulting place. This function should only be used to
read from the resulting mplace, not to get its address back.
Trait Implementations
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::PointerTag>[src]
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::PointerTag>[src]fn layout(&self) -> TyAndLayout<'tcx>[src]
fn layout(&self) -> TyAndLayout<'tcx>[src]Gets this value’s layout.
fn to_op(
&self,
_ecx: &InterpCx<'mir, 'tcx, M>
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>[src]
fn to_op(
&self,
_ecx: &InterpCx<'mir, 'tcx, M>
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>[src]Makes this into an OpTy.
fn from_mem_place(mplace: MPlaceTy<'tcx, M::PointerTag>) -> Self[src]
fn from_mem_place(mplace: MPlaceTy<'tcx, M::PointerTag>) -> Self[src]Creates this from an MPlaceTy.
fn project_downcast(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
variant: VariantIdx
) -> InterpResult<'tcx, Self>[src]
fn project_downcast(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
variant: VariantIdx
) -> InterpResult<'tcx, Self>[src]Projects to the given enum variant.
fn project_field(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
field: usize
) -> InterpResult<'tcx, Self>[src]
fn project_field(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
field: usize
) -> InterpResult<'tcx, Self>[src]Projects to the n-th field.
impl<'tcx, Tag: Copy> Copy for OpTy<'tcx, Tag>[src]
impl<'tcx, Tag: Eq> Eq for OpTy<'tcx, Tag>[src]
impl<'tcx, Tag> StructuralEq for OpTy<'tcx, Tag>[src]
impl<'tcx, Tag> StructuralPartialEq for OpTy<'tcx, Tag>[src]
Auto Trait Implementations
impl<'tcx, Tag = ()> !RefUnwindSafe for OpTy<'tcx, Tag>
impl<'tcx, Tag = ()> !Send for OpTy<'tcx, Tag>
impl<'tcx, Tag = ()> !Sync for OpTy<'tcx, Tag>
impl<'tcx, Tag> Unpin for OpTy<'tcx, Tag> where
Tag: Unpin,
Tag: Unpin,
impl<'tcx, Tag = ()> !UnwindSafe for OpTy<'tcx, Tag>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]