(&self)
| 149 | } |
| 150 | |
| 151 | async fn adapter_state(&self) -> Result<CentralState> { |
| 152 | let fut = CoreBluetoothReplyFuture::default(); |
| 153 | self.sender |
| 154 | .to_owned() |
| 155 | .send(CoreBluetoothMessage::GetAdapterState { |
| 156 | future: fut.get_state_clone(), |
| 157 | }) |
| 158 | .await?; |
| 159 | |
| 160 | match fut.await { |
| 161 | CoreBluetoothReply::AdapterState(state) => { |
| 162 | let central_state = get_central_state(state); |
| 163 | return Ok(central_state.clone()); |
| 164 | } |
| 165 | _ => panic!("Shouldn't get anything but a AdapterState!"), |
| 166 | } |
| 167 | } |
| 168 | } |
nothing calls this directly
no test coverage detected