Skip to main content

DiscriminantKind

Trait DiscriminantKind 

Source
pub trait DiscriminantKind {
    type Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin;
}
🔬This is a nightly-only experimental API. (discriminant_kind)
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.

Required Associated Types§

Source

type Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin

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

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Morty Proxy This is a proxified and sanitized view of the page, visit original site.