From 4934ed726d51913afd97ca937d0ece39ef8b7371 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 21 Jul 2022 20:22:56 +0200 Subject: Propose alternative API --- examples/basalt.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/basalt.rs b/examples/basalt.rs index dd56cd7..3841786 100644 --- a/examples/basalt.rs +++ b/examples/basalt.rs @@ -159,11 +159,15 @@ impl Example { #[async_trait] impl EndpointHandler for Example { - async fn handle(self: &Arc, msg: ExampleMessage, _from: NodeID) -> ExampleResponse { + async fn handle( + self: &Arc, + msg: Req, + _from: NodeID, + ) -> Resp { debug!("Got example message: {:?}, sending example response", msg); - ExampleResponse { + Resp::new(ExampleResponse { example_field: false, - } + }) } } -- cgit v1.2.3