Struct rustc::mir::interpret::Allocation [−][src]
pub struct Allocation { pub bytes: Vec<u8>, pub relocations: Relocations, 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: Relocations
🔬 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 codegenning
Only happens for static mut
or static
with interior mutability
Methods
impl Allocation
[src]
impl Allocation
pub fn from_bytes(slice: &[u8], align: Align) -> Self
[src]
pub fn from_bytes(slice: &[u8], align: Align) -> 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 from_byte_aligned_bytes(slice: &[u8]) -> Self
[src]
pub fn from_byte_aligned_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?
pub fn undef(size: Size, align: Align) -> Self
[src]
pub fn undef(size: Size, align: Align) -> 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 Allocation
fn 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 Clone for Allocation
[src]
impl Clone for Allocation
fn clone(&self) -> Allocation
[src]
fn clone(&self) -> Allocation
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Allocation
[src]
impl Debug for Allocation
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Allocation
[src]
impl Eq for Allocation
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl PartialEq for Allocation
[src]
impl PartialEq for Allocation
fn eq(&self, other: &Allocation) -> bool
[src]
fn eq(&self, other: &Allocation) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Allocation) -> bool
[src]
fn ne(&self, other: &Allocation) -> bool
This method tests for !=
.
impl PartialOrd for Allocation
[src]
impl PartialOrd for Allocation
fn partial_cmp(&self, other: &Allocation) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Allocation) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Allocation) -> bool
[src]
fn lt(&self, other: &Allocation) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Allocation) -> bool
[src]
fn le(&self, other: &Allocation) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Allocation) -> bool
[src]
fn gt(&self, other: &Allocation) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Allocation) -> bool
[src]
fn ge(&self, other: &Allocation) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Allocation
[src]
impl Ord for Allocation
fn cmp(&self, other: &Allocation) -> Ordering
[src]
fn cmp(&self, other: &Allocation) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Allocation
[src]
impl Hash for Allocation
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &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 Allocation
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
[src]
fn encode<__S: Encoder>(&self, s: &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 Allocation
fn decode<__D: Decoder>(d: &mut __D) -> Result<Allocation, __D::Error>
[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<Allocation, __D::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<'tcx> UseSpecializedDecodable for &'tcx Allocation
[src]
impl<'tcx> UseSpecializedDecodable for &'tcx Allocation
fn default_decode<D>(&mut D) -> Result<Self, <D as Decoder>::Error> where
D: Decoder,
[src]
fn default_decode<D>(&mut D) -> Result<Self, <D as Decoder>::Error> where
D: Decoder,
🔬 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?
Defaults to returning an error (see SpecializationError
).
impl<'a, 'tcx, 'x> SpecializedDecoder<&'tcx Allocation> for CacheDecoder<'a, 'tcx, 'x>
[src]
impl<'a, 'tcx, 'x> SpecializedDecoder<&'tcx Allocation> for CacheDecoder<'a, 'tcx, 'x>
fn specialized_decode(&mut self) -> Result<&'tcx Allocation, Self::Error>
[src]
fn specialized_decode(&mut self) -> Result<&'tcx Allocation, Self::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?
Decode a value in a manner specific to this decoder state.
Auto Trait Implementations
impl Send for Allocation
impl Send for Allocation
impl Sync for Allocation
impl Sync for Allocation