[−][src]Struct rustc_middle::mir::interpret::pointer::Pointer
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]
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]
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<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]
Tag: Decodable<__D>,
impl<Tag: Debug> Display for Pointer<Tag>[src]
impl<'tcx, Tag, __E: TyEncoder<'tcx>> Encodable<__E> for Pointer<Tag> where
Tag: Encodable<__E>, [src]
Tag: Encodable<__E>,
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]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Pointer<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>, [src]
Tag: HashStable<StableHashingContext<'__ctx>>,
pub 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]
pub fn cmp(&self, other: &Pointer<Tag>) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self[src]
impl<Tag: PartialEq> PartialEq<Pointer<Tag>> for Pointer<Tag>[src]
pub fn eq(&self, other: &Pointer<Tag>) -> bool[src]
pub fn ne(&self, other: &Pointer<Tag>) -> bool[src]
impl<Tag: PartialOrd> PartialOrd<Pointer<Tag>> for Pointer<Tag>[src]
pub fn partial_cmp(&self, other: &Pointer<Tag>) -> Option<Ordering>[src]
pub fn lt(&self, other: &Pointer<Tag>) -> bool[src]
pub fn le(&self, other: &Pointer<Tag>) -> bool[src]
pub fn gt(&self, other: &Pointer<Tag>) -> bool[src]
pub fn ge(&self, other: &Pointer<Tag>) -> bool[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<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
T: Copy, [src]
T: Copy,
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> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MaybeResult<T> for T[src]
type Error = !
pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]
pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.