Trait core::marker::DiscriminantKind[][src]

pub trait DiscriminantKind {
    type Discriminant: Clone + Copy + Debug + Eq + PartialEq + 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

编译器内部的 trait 用于指示枚举判别式的类型。

这个 trait 是为每种类型自动实现的,并且不会给 mem::Discriminant 添加任何保证。 在 DiscriminantKind::Discriminantmem::Discriminant 之间转换是未定义的行为。

Associated Types

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

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

判别类型,必须满足 mem::Discriminant 要求的 trait bounds。

Implementors