(&mut self, cmd: WsCommand)
| 163 | } |
| 164 | |
| 165 | async fn handle_ws_command(&mut self, cmd: WsCommand) -> WsResult { |
| 166 | match &self.state { |
| 167 | WsState::UnAuth => self.handle_ws_command_unauth(cmd).await, |
| 168 | WsState::Authorized(_) => self.handle_ws_command_auth(cmd).await, |
| 169 | } |
| 170 | } |
| 171 | async fn handle_ws_command_unauth(&mut self, cmd: WsCommand) -> WsResult { |
| 172 | match cmd { |
| 173 | WsCommand::Authorize(token) => self.do_login(token).await, |
no test coverage detected