pub fn switch(&mut self) {
        if self.step == 0 {
            self.led1_on();
            self.led2_off();
            self.led3_on();
            self.led4_off();
        } else {
            self.led1_off();
            self.led2_on();
            self.led3_off();
            self.led4_on();
        }

        self.step += 1;

        if self.step > 1 {
            self.step = 0;
        }
    }
// &self is required to access local elements in the structure, LEDManager
// & is required to borrow, you use self without & you consume the instance
// use &mut self if you want to write to your elements
&self is required to access local elements in the structure, LEDManager
& is required to borrow, you use self without & you consume the instance
use &mut self if you want to write to your elements
&self is required to access local elements in the structure LEDManager & is required to borrow you use self without & you consume the instance use &mut self if you want to write to your elements
pub fn switch(&mut self) {
        if self.step == 0 {
            self.led1_on();
            self.led2_off();
            self.led3_on();
            self.led4_off();
        } else {
            self.led1_off();
            self.led2_on();
            self.led3_off();
            self.led4_on();
        }
        self.step += 1;
        if self.step > 1 {
            self.step = 0;
        }
    }
pub fn switch ( & mut self ) { if self . step == 0 { self . led1_on ( ) ; self . led2_off ( ) ; self . led3_on ( ) ; self . led4_off ( ) ; } else { self . led1_off ( ) ; self . led2_on ( ) ; self . led3_off ( ) ; self . led4_on ( ) ; } self . step += 1 ; if self . step > 1 { self . step = 0 ; } }
&self is required to access local elements in the structure, LEDManager
& is required to borrow, you use self without & you consume the instance
use &mut self if you want to write to your elements
&self is required to access local elements in the structure LEDManager & is required to borrow you use self without & you consume the instance use &mut self if you want to write to your elements
&mut self
&mut self