[−][src]Struct rustc_middle::mir::interpret::pointer::Pointer

pub struct Pointer<Tag = ()> {
    pub alloc_id: AllocId,
    pub offset: Size,
    pub tag: Tag,
}

Represents a pointer in the Miri engine.

Pointer is generic over the Tag associated with each pointer, which is used to do provenance tracking during execution.

Fields

alloc_id: AllocIdoffset: Sizetag: Tag

Implementations

impl Pointer<()>[src]

pub fn new(alloc_id: AllocId, offset: Size) -> Self[src]

pub fn with_tag<Tag>(self, tag: Tag) -> Pointer<Tag>[src]

impl<'tcx, Tag> Pointer<Tag>[src]

pub fn new_with_tag(alloc_id: AllocId, offset: Size, tag: Tag) -> Self[src]

pub fn offset(
    self,
    i: Size,
    cx: &impl HasDataLayout
) -> InterpResult<'tcx, Self>
[src]

pub fn overflowing_offset(
    self,
    i: Size,
    cx: &impl HasDataLayout
) -> (Self, bool)
[src]

pub fn wrapping_offset(self, i: Size, cx: &impl HasDataLayout) -> Self[src]

pub fn signed_offset(
    self,
    i: i64,
    cx: &impl HasDataLayout
) -> InterpResult<'tcx, Self>
[src]

pub fn overflowing_signed_offset(
    self,
    i: i64,
    cx: &impl HasDataLayout
) -> (Self, bool)
[src]

pub fn wrapping_signed_offset(self, i: i64, cx: &impl HasDataLayout) -> Self[src]

pub fn erase_tag(self) -> Pointer[src]

Trait Implementations

impl<Tag: Clone> Clone for Pointer<Tag>[src]

impl<Tag: Copy> Copy for Pointer<Tag>[src]

impl<Tag: Debug> Debug for Pointer<Tag>[src]

impl Debug for Pointer<()>[src]

impl<'tcx, Tag, __D: TyDecoder<'tcx>> Decodable<__D> for Pointer<Tag> where
    Tag: Decodable<__D>, 
[src]

impl<Tag: Debug> Display for Pointer<Tag>[src]

impl<'tcx, Tag, __E: TyEncoder<'tcx>> Encodable<__E> for Pointer<Tag> where
    Tag: Encodable<__E>, 
[src]

impl<Tag: Eq> Eq for Pointer<Tag>[src]

impl From<AllocId> for Pointer[src]

Produces a Pointer that points to the beginning of the Allocation.

impl<Tag> From<Pointer<Tag>> for Scalar<Tag>[src]

impl<Tag> From<Pointer<Tag>> for ScalarMaybeUninit<Tag>[src]

impl<Tag: Hash> Hash for Pointer<Tag>[src]

impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Pointer<Tag> where
    Tag: HashStable<StableHashingContext<'__ctx>>, 
[src]

impl<Tag: Ord> Ord for Pointer<Tag>[src]

impl<Tag: PartialEq> PartialEq<Pointer<Tag>> for Pointer<Tag>[src]

impl<Tag: PartialOrd> PartialOrd<Pointer<Tag>> for Pointer<Tag>[src]

impl<Tag> StructuralEq for Pointer<Tag>[src]

impl<Tag> StructuralPartialEq for Pointer<Tag>[src]

Auto Trait Implementations

impl<Tag> RefUnwindSafe for Pointer<Tag> where
    Tag: RefUnwindSafe, 

impl<Tag> Send for Pointer<Tag> where
    Tag: Send, 

impl<Tag> Sync for Pointer<Tag> where
    Tag: Sync, 

impl<Tag> Unpin for Pointer<Tag> where
    Tag: Unpin, 

impl<Tag> UnwindSafe for Pointer<Tag> where
    Tag: UnwindSafe, 

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
    T: Copy, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]