Struct rustc_middle::mir::interpret::Pointer [−][src]
Expand description
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: TagImplementations
impl Pointer<()>[src]
impl Pointer<()>[src]impl<'tcx, 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]
self,
i: Size,
cx: &impl HasDataLayout
) -> InterpResult<'tcx, Self>
pub fn overflowing_offset(
self,
i: Size,
cx: &impl HasDataLayout
) -> (Self, bool)[src]
self,
i: Size,
cx: &impl HasDataLayout
) -> (Self, bool)
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]
self,
i: i64,
cx: &impl HasDataLayout
) -> InterpResult<'tcx, Self>
pub fn overflowing_signed_offset(
self,
i: i64,
cx: &impl HasDataLayout
) -> (Self, bool)[src]
self,
i: i64,
cx: &impl HasDataLayout
) -> (Self, bool)
pub fn wrapping_signed_offset(self, i: i64, cx: &impl HasDataLayout) -> Self[src]
pub fn erase_tag(self) -> Pointer[src]
Trait Implementations
impl<'tcx, Tag, __D: TyDecoder<'tcx>> Decodable<__D> for Pointer<Tag> where
Tag: Decodable<__D>, [src]
impl<'tcx, Tag, __D: TyDecoder<'tcx>> Decodable<__D> for Pointer<Tag> where
Tag: Decodable<__D>, [src]impl<'tcx, Tag, __E: TyEncoder<'tcx>> Encodable<__E> for Pointer<Tag> where
Tag: Encodable<__E>, [src]
impl<'tcx, Tag, __E: TyEncoder<'tcx>> Encodable<__E> for Pointer<Tag> where
Tag: Encodable<__E>, [src]impl From<AllocId> for Pointer[src]
impl From<AllocId> for Pointer[src]Produces a Pointer that points to the beginning of the Allocation.
impl<Tag> From<Pointer<Tag>> for ScalarMaybeUninit<Tag>[src]
impl<Tag> From<Pointer<Tag>> for ScalarMaybeUninit<Tag>[src]impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Pointer<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>, [src]
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Pointer<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: Ord> Ord for Pointer<Tag>[src]
impl<Tag: Ord> Ord for Pointer<Tag>[src]impl<Tag: PartialOrd> PartialOrd<Pointer<Tag>> for Pointer<Tag>[src]
impl<Tag: PartialOrd> PartialOrd<Pointer<Tag>> for Pointer<Tag>[src]fn partial_cmp(&self, other: &Pointer<Tag>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Pointer<Tag>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<Tag: Copy> Copy for Pointer<Tag>[src]
impl<Tag: Eq> Eq 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,
Tag: RefUnwindSafe,
impl<Tag> Send for Pointer<Tag> where
Tag: Send,
Tag: Send,
impl<Tag> Sync for Pointer<Tag> where
Tag: Sync,
Tag: Sync,
impl<Tag> Unpin for Pointer<Tag> where
Tag: Unpin,
Tag: Unpin,
impl<Tag> UnwindSafe for Pointer<Tag> where
Tag: UnwindSafe,
Tag: UnwindSafe,
Blanket Implementations
impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
T: Copy, [src]
impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
T: Copy, [src]pub fn allocate_on(Self, &'a Arena<'tcx>) -> &'a mut T[src]
pub fn allocate_from_iter(
&'a Arena<'tcx>,
impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘ[src]
&'a Arena<'tcx>,
impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘ
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> MaybeResult<T> for T[src]
impl<T> MaybeResult<T> for T[src]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]fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]
fn with_const(self) -> ConstnessAnd<Self>[src]
fn without_const(self) -> ConstnessAnd<Self>[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,