fn paused(&mut self) -> StateMachine<Self> {
        match self.event_receiver.recv() {
            // Paused ---- Resume ----> Running
            Ok(VcpuEvent::Resume) => {
                // Nothing special to do.
                self.response_sender
                    .send(VcpuResponse::Resumed)
                    .expect("failed to send resume status");
                // Move to 'running' state.
                StateMachine::next(Self::running)
            }
            // All other events have no effect on current 'paused' state.
            Ok(_) => StateMachine::next(Self::paused),
            // Unhandled exit of the other end.
            Err(_) => {
                // Move to 'exited' state.
                self.exit(FC_EXIT_CODE_GENERIC_ERROR)
            }
        }
    }
// This is the main loop of the `Paused` state.
This is the main loop of the `Paused` state.
This is the main loop of the ` Paused ` state .
fn paused(&mut self) -> StateMachine<Self> {
        match self.event_receiver.recv() {
            // Paused ---- Resume ----> Running
            Ok(VcpuEvent::Resume) => {
                // Nothing special to do.
                self.response_sender
                    .send(VcpuResponse::Resumed)
                    .expect("failed to send resume status");
                // Move to 'running' state.
                StateMachine::next(Self::running)
            }
            // All other events have no effect on current 'paused' state.
            Ok(_) => StateMachine::next(Self::paused),
            // Unhandled exit of the other end.
            Err(_) => {
                // Move to 'exited' state.
                self.exit(FC_EXIT_CODE_GENERIC_ERROR)
            }
        }
    }
fn paused ( & mut self ) -> StateMachine < Self > { match self . event_receiver . recv ( ) { // Paused ---- Resume ----> Running Ok ( VcpuEvent :: Resume ) => { // Nothing special to do. self . response_sender . send ( VcpuResponse :: Resumed ) . expect ( " " ) ; // Move to 'running' state. StateMachine :: next ( Self :: running ) } // All other events have no effect on current 'paused' state. Ok ( _ ) => StateMachine :: next ( Self :: paused ) , // Unhandled exit of the other end. Err ( _ ) => { // Move to 'exited' state. self . exit ( FC_EXIT_CODE_GENERIC_ERROR ) } } }
This is the main loop of the `Paused` state.
This is the main loop of the ` Paused ` state .
&mut self