(&self, query: Query)
| 82 | #[async_trait] |
| 83 | impl SubscriptionClient for HybridClient { |
| 84 | async fn subscribe(&self, query: Query) -> Result<Subscription, Error> { |
| 85 | let (tx, rx) = tokio::sync::oneshot::channel(); |
| 86 | |
| 87 | self.cmd_tx |
| 88 | .send(DriverCommand::Subscribe(query, tx)) |
| 89 | .map_err(|_| Error::channel_send())?; |
| 90 | |
| 91 | rx.await |
| 92 | .map_err(|e| Error::client_internal(e.to_string()))? |
| 93 | } |
| 94 | |
| 95 | async fn unsubscribe(&self, query: Query) -> Result<(), Error> { |
| 96 | let (tx, rx) = tokio::sync::oneshot::channel(); |
no test coverage detected