(&self, id: &str, data: Vec<u8>)
| 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) { |
| 76 | tx.send(data).is_ok() |
| 77 | } else { |
| 78 | false |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | pub async fn remove(&self, id: &str) { |
| 83 | self.inner.lock().await.remove(id); |