4 ms·
I'd personally do this: pub enum SearchOption { Left, Full, Beta(SearchOptionBeta), } #[non_exhaustive] pub enum SearchOptionBeta {
by swsieber 7y ago
I'd personally do this:
pub enum SearchOption {
Left,
Full,
Beta(SearchOptionBeta),
}
#[non_exhaustive]
pub enum SearchOptionBeta {
Right
}
- mamcx 7y agoYeah, this is how could be done with this, but also show why is a poor abstraction. If enums were abled to be extended: match e: SearchOptionBeta { SearchOptionBeta:: Left, Rigth, Full }