1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#[derive(Debug, Clone, Copy)] pub enum Mode { Any, PushOnly, } impl Mode { pub fn is_any(&self) -> bool { matches!(*self, Self::Any) } pub fn is_push_only(&self) -> bool { matches!(*self, Self::PushOnly) } }