aboutsummaryrefslogtreecommitdiff
path: root/examples/basalt.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-21 20:22:56 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-21 20:22:56 +0200
commit4934ed726d51913afd97ca937d0ece39ef8b7371 (patch)
treead9560d819bfcbab9e35ee806bd9b2adaa8f9de5 /examples/basalt.rs
parent7d148c7e764d563efa3bccc0f14f50867db38ef1 (diff)
downloadnetapp-4934ed726d51913afd97ca937d0ece39ef8b7371.tar.gz
netapp-4934ed726d51913afd97ca937d0ece39ef8b7371.zip
Propose alternative API
Diffstat (limited to 'examples/basalt.rs')
-rw-r--r--examples/basalt.rs10
1 files changed, 7 insertions, 3 deletions
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<ExampleMessage> for Example {
- async fn handle(self: &Arc<Self>, msg: ExampleMessage, _from: NodeID) -> ExampleResponse {
+ async fn handle(
+ self: &Arc<Self>,
+ msg: Req<ExampleMessage>,
+ _from: NodeID,
+ ) -> Resp<ExampleMessage> {
debug!("Got example message: {:?}, sending example response", msg);
- ExampleResponse {
+ Resp::new(ExampleResponse {
example_field: false,
- }
+ })
}
}