Enum rustc::ty::VariantDiscr
[−]
[src]
pub enum VariantDiscr { Explicit(DefId), Relative(usize), }
🔬 This is a nightly-only experimental API. (
rustc_private
)Variants
Explicit(DefId)
🔬 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.
Relative(usize)
🔬 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]
fn clone(&self) -> VariantDiscr
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for VariantDiscr
[src]
impl PartialEq for VariantDiscr
[src]
fn eq(&self, __arg_0: &VariantDiscr) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &VariantDiscr) -> bool
This method tests for !=
.
impl Eq for VariantDiscr
[src]
impl Encodable for VariantDiscr
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
deprecated in favor of rustc-serialize on crates.io
impl Decodable for VariantDiscr
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<VariantDiscr, __D::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
deprecated in favor of rustc-serialize on crates.io