Struct rustc_mir::interpret::MemPlace [−][src]
pub struct MemPlace<Tag = ()> { pub ptr: Scalar<Tag>, pub align: Align, pub meta: MemPlaceMeta<Tag>, }
Fields
ptr: Scalar<Tag>A place may have an integral pointer for ZSTs, and since it might be turned back into a reference before ever being dereferenced. However, it may never be uninit.
align: Alignmeta: MemPlaceMeta<Tag>Metadata for unsized places. Interpretation is up to the type.
Must not be present for sized types, but can be missing for unsized types
(e.g., extern type).
Implementations
Replace ptr tag, maintain vtable tag (if any)
Turn a mplace into a (thin or wide) pointer, as a reference, pointing to the same space.
This is the inverse of ref_to_mplace.
pub fn offset<'tcx>(
self,
offset: Size,
meta: MemPlaceMeta<Tag>,
cx: &impl HasDataLayout
) -> InterpResult<'tcx, Self>Trait Implementations
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for MemPlace<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for MemPlace<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>, Auto Trait Implementations
impl<Tag> RefUnwindSafe for MemPlace<Tag> where
Tag: RefUnwindSafe, impl<Tag> UnwindSafe for MemPlace<Tag> where
Tag: UnwindSafe, Blanket Implementations
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.