Not really. What I have seen is introducing a new struct for each enum variant, and then methods on the enum to decompose it: struct Dog(i32); ...
確定! 回上一頁