summaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authorAria <me@aria.rip>2023-10-13 14:13:58 +0100
committerAria <me@aria.rip>2023-10-13 14:13:58 +0100
commitb2d679f05d04052bfc25167eaaf09c60c03251cb (patch)
tree7ca49d117a3167169e5b92613ca21c88c12bd47f /common/src
parentc063f4da42a538138cc3e80a0e1faaf813a13bd2 (diff)
wip: fault tolerant broadcast
Diffstat (limited to 'common/src')
-rw-r--r--common/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index d58d10b..69a872b 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -22,11 +22,11 @@ pub trait Handler: Send + Sync + 'static {
type Body: Serialize + for<'a> Deserialize<'a> + Send + Clone;
fn init(node_id: String, node_ids: Vec<String>, output: Output<Self::Body>) -> Self;
- fn handle(
- &self,
+ fn handle<'a>(
+ self: &'a Arc<Self>,
header: MessageHeader,
body: Self::Body,
- ) -> impl Future<Output = ()> + Send + '_;
+ ) -> impl Future<Output = ()> + Send + 'a;
}
pub fn run_server<H: Handler>() {