Struct rustc::mir::interpret::Allocation
[−]
[src]
pub struct Allocation {
pub bytes: Vec<u8>,
pub relocations: BTreeMap<u64, AllocId>,
pub undef_mask: UndefMask,
pub align: Align,
pub runtime_mutability: Mutability,
}🔬 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?
Fields
bytes: Vec<u8>
🔬 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?
The actual bytes of the allocation. Note that the bytes of a pointer represent the offset of the pointer
relocations: BTreeMap<u64, AllocId>
🔬 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?
Maps from byte addresses to allocations. Only the first byte of a pointer is inserted into the map.
undef_mask: UndefMask
🔬 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?
Denotes undefined memory. Reading from undefined memory is forbidden in miri
align: Align
🔬 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?
The alignment of the allocation to detect unaligned reads.
runtime_mutability: Mutability
🔬 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?
Whether the allocation (of a static) should be put into mutable memory when translating
Only happens for static mut or static with interior mutability
Methods
impl Allocation[src]
impl Allocationpub fn from_bytes(slice: &[u8]) -> Self[src]
pub fn from_bytes(slice: &[u8]) -> 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?
Trait Implementations
impl<'a> HashStable<StableHashingContext<'a>> for Allocation[src]
impl<'a> HashStable<StableHashingContext<'a>> for Allocationfn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)🔬 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?
impl Debug for Allocation[src]
impl Debug for Allocationfn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
fn fmt(&self, __arg_0: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for Allocation[src]
impl Eq for Allocationimpl PartialEq for Allocation[src]
impl PartialEq for Allocationfn eq(&self, __arg_0: &Allocation) -> bool[src]
fn eq(&self, __arg_0: &Allocation) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Allocation) -> bool[src]
fn ne(&self, __arg_0: &Allocation) -> boolThis method tests for !=.
impl Hash for Allocation[src]
impl Hash for Allocationfn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Encodable for Allocation[src]
impl Encodable for Allocationfn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>🔬 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?
impl Decodable for Allocation[src]
impl Decodable for AllocationAuto Trait Implementations
impl Send for Allocation
impl Send for Allocationimpl Sync for Allocation
impl Sync for Allocation