Trait ActorListener

Source
pub trait ActorListener<Msg, Command = Infallible> {
    // Required method
    fn next_msg(
        &mut self,
    ) -> impl Future<Output = Option<ActorMsg<Msg, Command>>>;
}

Required Methods§

Source

fn next_msg(&mut self) -> impl Future<Output = Option<ActorMsg<Msg, Command>>>

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 ActorListener<Result<(TcpStream, SocketAddr), Error>> for TcpListener

Source§

async fn next_msg( &mut self, ) -> Option<ActorMsg<Result<(TcpStream, SocketAddr)>>>

Source§

impl<Msg, Command> ActorListener<Msg, Command> for UnboundedReceiver<ActorMsg<Msg, Command>>

UnboundedReceiver

Source§

async fn next_msg(&mut self) -> Option<ActorMsg<Msg, Command>>

Source§

impl<Resp> ActorListener<Resp> for Interval
where Resp: From<Instant>,

Interval

Source§

async fn next_msg(&mut self) -> Option<ActorMsg<Resp>>

Implementors§