pub trait UnitEnum {
    type Unit;

    fn to_unit(&self) -> Self::Unit;
}
Expand description

A utility trait for associating a data enum with a unit enum that has the same variants.

Required Associated Types

An enum with the same variants as the implementor but without any data.

Required Methods

Turn this type into it’s unit enum.

Implementors