(&self, id: String)
| 66 | } |
| 67 | |
| 68 | pub async fn insert(&self, id: String) -> oneshot::Receiver<Vec<u8>> { |
| 69 | let (tx, rx) = oneshot::channel(); |
| 70 | self.inner.lock().await.insert(id, tx); |
| 71 | rx |
| 72 | } |
| 73 | |
| 74 | pub async fn complete(&self, id: &str, data: Vec<u8>) -> bool { |
| 75 | if let Some(tx) = self.inner.lock().await.remove(id) { |