hyperactor_mesh/
test_utils.rs1use async_trait::async_trait;
10use hyperactor::Actor;
11use hyperactor::Bind;
12use hyperactor::Context;
13use hyperactor::Handler;
14use hyperactor::Named;
15use hyperactor::Unbind;
16use serde::Deserialize;
17use serde::Serialize;
18
19#[derive(Serialize, Deserialize, Debug, Named, Clone, Bind, Unbind)]
21pub struct EmptyMessage();
22
23#[derive(Debug, PartialEq, Default, Actor)]
24#[hyperactor::export(
25 handlers = [
26 EmptyMessage { cast = true },
27 ],
28)]
29pub struct EmptyActor();
30
31#[async_trait]
32impl Handler<EmptyMessage> for EmptyActor {
33 async fn handle(&mut self, _: &Context<Self>, _: EmptyMessage) -> Result<(), anyhow::Error> {
34 Ok(())
35 }
36}
37hyperactor::remote!(EmptyActor);