Command processing

This commit is contained in:
2026-07-23 01:34:04 +02:00
parent d74d94af89
commit 8e83c5cd5b
4 changed files with 47 additions and 38 deletions
+9 -1
View File
@@ -83,7 +83,15 @@ impl<'a, T> Drop for StateGuard<'a, T> {
}
impl Context {
pub async fn event<E: Any + Send + Sync>(&self, event: E) {
self.tx.send(Box::new(event)).await.unwrap()
}
pub async fn close(&self) {
self.tx.send(Box::new(Close)).await.unwrap()
self.event(Close).await
}
pub async fn refresh(&self) {
self.event(Refresh).await
}
}