First, you can use PartialEq trait, for example, by #[derive]: #[derive(PartialEq)] enum MyEnum { ... } Then your "ideal" variant will work as is.
確定! 回上一頁