Struct actix::prelude::MessageResult [−][src]
Expand description
A helper type that implements the MessageResponse
trait.
Examples
use actix::prelude::*;
#[derive(Message)]
#[rtype(result = "Response")]
struct Msg;
struct Response;
struct MyActor;
impl Actor for MyActor {
type Context = Context<Self>;
}
impl Handler<Msg> for MyActor {
type Result = MessageResult<Msg>;
fn handle(&mut self, _: Msg, _: &mut Context<Self>) -> Self::Result {
MessageResult(Response {})
}
}
Tuple Fields
0: M::Result