# Trait std::marker::DiscriminantKind
[−][src]

    pub trait DiscriminantKind {
        type Discriminant: Clone + Copy + Debug + Eq + PartialEq<Self::Discriminant> + Hash + Send + Sync + Unpin;
    }

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

this trait is unlikely to ever be stabilized, use `mem::discriminant` instead

Expand description

Compiler-internal trait used to indicate the type of enum discriminants.

This trait is automatically implemented for every type and does not add any guarantees to `mem::Discriminant`. It is undefined behavior to transmute between `DiscriminantKind::Discriminant` and `mem::Discriminant`.

## Associated Types

[src]

#### type Discriminant: Clone + Copy + Debug + Eq + PartialEq<Self::Discriminant> + Hash + Send + Sync + Unpin

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

this trait is unlikely to ever be stabilized, use `mem::discriminant` instead

The type of the discriminant, which must satisfy the trait bounds required by `mem::Discriminant`.

## Implementors