pub trait UnitEnum {
type Unit: Debug + Clone + Copy + PartialEq + Eq + PartialOrd + Ord + Hash;
// Required methods
fn to_unit(&self) -> Self::Unit;
fn unit_iter() -> Box<dyn Iterator<Item = Self::Unit>>;
}
Expand description
A utility trait for associating a data enum with a unit enum that has the same variants.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.