Enum rustc_target::abi::Variants [−][src]
pub enum Variants {
Single {
index: usize,
},
Tagged {
tag: Scalar,
variants: Vec<LayoutDetails>,
},
NicheFilling {
dataful_variant: usize,
niche_variants: RangeInclusive<usize>,
niche: Scalar,
niche_start: u128,
variants: Vec<LayoutDetails>,
},
}🔬 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?
Variants
Single🔬 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?
Single enum variants, structs/tuples, unions, and all non-ADTs.
Fields of Single
index: usize | 🔬 This is a nightly-only experimental API. ( |
Tagged🔬 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?
General-case enums: for each case there is a struct, and they all have all space reserved for the tag, and their first field starts at a non-0 offset, after where the tag would go.
Fields of Tagged
tag: Scalar | 🔬 This is a nightly-only experimental API. ( |
variants: Vec<LayoutDetails> | 🔬 This is a nightly-only experimental API. ( |
NicheFilling🔬 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?
Multiple cases distinguished by a niche (values invalid for a type):
the variant dataful_variant contains a niche at an arbitrary
offset (field 0 of the enum), which for a variant with discriminant
d is set to (d - niche_variants.start).wrapping_add(niche_start).
For example, Option<(usize, &T)> is represented such that
None has a null pointer for the second tuple field, and
Some is the identity function (with a non-null reference).
Fields of NicheFilling
dataful_variant: usize | 🔬 This is a nightly-only experimental API. ( |
niche_variants: RangeInclusive<usize> | 🔬 This is a nightly-only experimental API. ( |
niche: Scalar | 🔬 This is a nightly-only experimental API. ( |
niche_start: u128 | 🔬 This is a nightly-only experimental API. ( |
variants: Vec<LayoutDetails> | 🔬 This is a nightly-only experimental API. ( |
Trait Implementations
impl PartialEq for Variants[src]
impl PartialEq for Variantsfn eq(&self, other: &Variants) -> bool[src]
fn eq(&self, other: &Variants) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Variants) -> bool[src]
fn ne(&self, other: &Variants) -> boolThis method tests for !=.
impl Eq for Variants[src]
impl Eq for Variantsfn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)impl Hash for Variants[src]
impl Hash for Variantsfn 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 Debug for Variants[src]
impl Debug for Variants