Struct rustc_mir::interpret::place::MemPlace [−][src]
pub struct MemPlace<Tag = ()> { pub ptr: Scalar<Tag>, pub align: Align, pub meta: MemPlaceMeta<Tag>, }
Fields
ptr: Scalar<Tag>Expand description
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>Expand description
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
impl<Tag> MemPlace<Tag>[src]
impl<Tag> MemPlace<Tag>[src]pub fn replace_tag(self, new_tag: Tag) -> Self[src]
pub fn replace_tag(self, new_tag: Tag) -> Self[src]Replace ptr tag, maintain vtable tag (if any)
pub fn erase_tag(self) -> MemPlace[src]
fn from_scalar_ptr(ptr: Scalar<Tag>, align: Align) -> Self[src]
pub fn from_ptr(ptr: Pointer<Tag>, align: Align) -> Self[src]
pub fn to_ref(self) -> Immediate<Tag>[src]
pub fn to_ref(self) -> Immediate<Tag>[src]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>[src]
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>>, [src]
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for MemPlace<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>, [src]fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)[src]
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
impl<Tag: Copy> Copy for MemPlace<Tag>[src]
impl<Tag: Eq> Eq for MemPlace<Tag>[src]
impl<Tag> StructuralEq for MemPlace<Tag>[src]
impl<Tag> StructuralPartialEq for MemPlace<Tag>[src]
Auto Trait Implementations
impl<Tag> RefUnwindSafe for MemPlace<Tag> where
Tag: RefUnwindSafe,
Tag: RefUnwindSafe,
impl<Tag> Send for MemPlace<Tag> where
Tag: Send,
Tag: Send,
impl<Tag> Sync for MemPlace<Tag> where
Tag: Sync,
Tag: Sync,
impl<Tag> Unpin for MemPlace<Tag> where
Tag: Unpin,
Tag: Unpin,
impl<Tag> UnwindSafe for MemPlace<Tag> where
Tag: UnwindSafe,
Tag: UnwindSafe,
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]