diff options
author | Aria <me@aria.rip> | 2023-10-13 14:13:58 +0100 |
---|---|---|
committer | Aria <me@aria.rip> | 2023-10-13 14:13:58 +0100 |
commit | b2d679f05d04052bfc25167eaaf09c60c03251cb (patch) | |
tree | 7ca49d117a3167169e5b92613ca21c88c12bd47f /common | |
parent | c063f4da42a538138cc3e80a0e1faaf813a13bd2 (diff) |
wip: fault tolerant broadcast
Diffstat (limited to 'common')
-rw-r--r-- | common/src/lib.rs | 6 |
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>() { |