fn update(&mut self, next_state: Self) {
        if self.is_valid_transition(&next_state) {
            *self = next_state;
        } else {
            panic!(
                "Invalid connection state change: {:?} -> {:?}",
                *self, next_state
            );
        }
    }
/// Validates/updates the state transition
Validates/updates the state transition
Validates / updates the state transition
fn update(&mut self, next_state: Self) {
        if self.is_valid_transition(&next_state) {
            *self = next_state;
        } else {
            panic!(
                "Invalid connection state change: {:?} -> {:?}",
                *self, next_state
            );
        }
    }
fn update ( & mut self , next_state : Self ) { if self . is_valid_transition ( & next_state ) { * self = next_state ; } else { panic ! ( " " self next_state ) ; } }
Validates/updates the state transition
Validates / updates the state transition
&mut self
next_state
Self
&mut self
next_state
Self