pub trait ExtractDiscriminant {
type Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin + TypeGraphLayout;
}Expand description
Helper trait to extract the core::marker::DiscriminantKind::Discriminant
of a type.
Implementing this trait also guarantees that the
core::marker::DiscriminantKind::Discriminant implements
typeset::ComputeTypeSet and that its values can be represented by
ExtractDiscriminant::Discriminant.
Required Associated Types§
Sourcetype Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin + TypeGraphLayout
type Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin + TypeGraphLayout
The type of the discriminant, which must satisfy the trait bounds
required by core::mem::Discriminant.
Enums implementing TypeLayout and typeset::ComputeTypeSet
manually should include ExtractDiscriminant::Discriminant in
their typeset::ComputeTypeSet::Output using the typeset::tset
helper macro.