1 2 3 4 5 6 7 8 9 10 11
pub enum Flag { SET = 0, CUR = 1, END = 2, } impl Flag { pub fn to(self) -> i32 { self as i32 } }