|
|
|
|
|
by mamcx
2369 days ago
|
|
I like the IDEA but the implementation is not the good one. Instead, this is what will be elegant: pub enum SearchOption {
Left,
Full,
}
pub enum SearchOptionBeta:SearchOption {
Rigth,
}
Yep, extending struct and enums.This mean MATCH touch "SearchOption" as the "stable" API and the inner crate touch SearchOptionBeta. When SearchOptionBeta need magic is that it match SearchOption too. Later is just a matter of replace one for the other. And this is even useful for more than to stabilize certain fields or arms... |
|