Skip to main content

MessageResponse

Trait MessageResponse 

Source
pub trait MessageResponse<A, M>: Send
where A: Actor, M: Message,
{ // Required method fn handle( self, ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send; }
Expand description

Types that can be sent as a response to a message.

Required Methods§

Source

fn handle( self, ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Handles the response.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<A, M> MessageResponse<A, M> for bool
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for char
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for f32
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for f64
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for i8
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for i16
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for i32
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for i64
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for isize
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for u8
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for u16
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for u32
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for u64
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for ()
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for usize
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M> MessageResponse<A, M> for String
where A: Actor, M: Message<Result = Self>,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M, T> MessageResponse<A, M> for Option<T>
where A: Actor, M: Message<Result = Self>, T: Send,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M, T> MessageResponse<A, M> for Box<T>
where A: Actor, M: Message<Result = Self>, T: Send,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M, T> MessageResponse<A, M> for Arc<T>
where A: Actor, M: Message<Result = Self>, T: Send + Sync,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M, T> MessageResponse<A, M> for Vec<T>
where A: Actor, M: Message<Result = Self>, T: Send,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Source§

impl<A, M, T, E> MessageResponse<A, M> for Result<T, E>
where A: Actor, M: Message<Result = Self>, T: Send, E: Into<BoxError> + Send,

Source§

fn handle( self, _ctx: &mut A::Context, tx: Option<Sender<M::Result>>, ) -> impl Future<Output = ()> + Send

Implementors§

Source§

impl<A, M> MessageResponse<A, M> for FutureMessageResult<M>
where A: Actor, M: Message,

Source§

impl<A, M> MessageResponse<A, M> for MessageResult<M>
where A: Actor, M: Message,