Enum rustc::ty::VariantDiscr [] [src]

pub enum VariantDiscr {
    Explicit(DefId),
    Relative(usize),
}
🔬 This is a nightly-only experimental API. (rustc_private)

Variants

🔬 This is a nightly-only experimental API. (rustc_private)

Explicit value for this variant, i.e. X = 123. The DefId corresponds to the embedded constant.

🔬 This is a nightly-only experimental API. (rustc_private)

The previous variant's discriminant plus one. For efficiency reasons, the distance from the last Explicit discriminant is being stored, or 0 for the first variant, if it has none.

Trait Implementations

impl Copy for VariantDiscr
[src]

impl Clone for VariantDiscr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for VariantDiscr
[src]

Formats the value using the given formatter.

impl PartialEq for VariantDiscr
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for VariantDiscr
[src]

impl Encodable for VariantDiscr
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

deprecated in favor of rustc-serialize on crates.io

impl Decodable for VariantDiscr
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

deprecated in favor of rustc-serialize on crates.io