ph
Size: a a a
ph
KR
AZ
impl Handler<Ping> for MyActor {
type Result = ResponseActFuture<Self, Result<bool, std::io::Error>>;
fn handle(&mut self, msg: Ping, ctx: &mut Context<Self>) -> Self::Result {
println!("Ping received");
let f = actix::fut::wrap_future::<_, Self>(async move {
connect("url").await;
Ok(true)
});
Box::pin(f)
}
}D
АГ
impl Handler<Ping> for MyActor {
type Result = ResponseActFuture<Self, Result<bool, std::io::Error>>;
fn handle(&mut self, msg: Ping, ctx: &mut Context<Self>) -> Self::Result {
println!("Ping received");
let f = actix::fut::wrap_future::<_, Self>(async move {
connect("url").await;
Ok(true)
});
Box::pin(f)
}
}d
d
ph
d
d
d
A
K
AZ
A
K
AZ
spawn_blockingA
A