1 2 3 4 5 6 7 8 9 10 11
pub trait Activable { fn active_mut(&mut self) -> &mut bool; fn active(mut self, set: bool) -> Self where Self: Sized, { *self.active_mut() = set; self } }