fn make_p_state_setter(
            sim: &Rc<RefCell<Self>>,
        ) -> Box<dyn cpu_control_handler::SetPStateIndex> {
            struct PStateSetter {
                sim: Rc<RefCell<Simulator>>,
            }
            impl cpu_control_handler::SetPStateIndex for PStateSetter {
                fn set_p_state_index(&mut self, index: usize) {
                    self.sim.borrow_mut().p_state_index = index;
                }
            }
            Box::new(PStateSetter { sim: sim.clone() })
        }
/// Returns a closure to set the simulator's P-state, for a CPU control handler test node.
Returns a closure to set the simulator's P-state, for a CPU control handler test node.
Returns a closure to set the simulator ' s P - state for a CPU control handler test node .
fn make_p_state_setter(
            sim: &Rc<RefCell<Self>>,
        ) -> Box<dyn cpu_control_handler::SetPStateIndex> {
            struct PStateSetter {
                sim: Rc<RefCell<Simulator>>,
            }
            impl cpu_control_handler::SetPStateIndex for PStateSetter {
                fn set_p_state_index(&mut self, index: usize) {
                    self.sim.borrow_mut().p_state_index = index;
                }
            }
            Box::new(PStateSetter { sim: sim.clone() })
        }
fn make_p_state_setter ( sim : & Rc < RefCell < Self > > , ) -> Box < dyn cpu_control_handler :: SetPStateIndex > { struct PStateSetter { sim : Rc < RefCell < Simulator > > , } impl cpu_control_handler :: SetPStateIndex for PStateSetter { fn set_p_state_index ( & mut self , index : usize ) { self . sim . borrow_mut ( ) . p_state_index = index ; } } Box :: new ( PStateSetter { sim : sim . clone ( ) } ) }
Returns a closure to set the simulator's P-state, for a CPU control handler test node.
Returns a closure to set the simulator ' s P - state for a CPU control handler test node .
sim
&Rc<RefCell<Self>>