Struct rustc::mir::interpret::Pointer
[−]
[src]
pub struct Pointer { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A wrapper type around PrimVal
that cannot be turned back into a PrimVal
accidentally.
This type clears up a few APIs where having a PrimVal
argument for something that is
potentially an integer pointer or a pointer to an allocation was unclear.
I (@oli-obk) believe it is less easy to mix up generic primvals and primvals that are just the representation of pointers. Also all the sites that convert between primvals and pointers are explicit now (and rare!)
Methods
impl<'tcx> Pointer
[src]
pub fn null() -> Self
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_ptr(self) -> EvalResult<'tcx, MemoryPointer>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn into_inner_primval(self) -> PrimVal
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn signed_offset<C: HasDataLayout>(
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
[src]
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn offset<C: HasDataLayout>(self, i: u64, cx: C) -> EvalResult<'tcx, Self>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn wrapping_signed_offset<C: HasDataLayout>(
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
[src]
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_null(self) -> EvalResult<'tcx, bool>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_value_with_len(self, len: u64) -> Value
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_value_with_vtable(self, vtable: MemoryPointer) -> Value
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_value(self) -> Value
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl Clone for Pointer
[src]
fn clone(&self) -> Pointer
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Pointer
[src]
impl Debug for Pointer
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl From<PrimVal> for Pointer
[src]
impl From<MemoryPointer> for Pointer
[src]
fn from(ptr: MemoryPointer) -> Self
[src]
Performs the conversion.