pub trait ExtractDiscriminant {
type Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin + ComputeTypeSet;
}
Available on crate feature
derive
only.Expand description
Helper trait to extract the core::marker::DiscriminantKind::Discriminant
of a type and prove that it implements typeset::ComputeTypeSet
and that
its values can be represented by Discriminant
.
Required Associated Types§
sourcetype Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin + ComputeTypeSet
type Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin + ComputeTypeSet
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.
Object Safety§
This trait is not object safe.