Skip to main content

Listener

Trait Listener 

Source
pub trait Listener {
    type Error: Error;

    // Required method
    async fn listen<E, F>(
        &self,
        f: F,
    ) -> Result<impl Stream<Item = (ActorId, E)> + Unpin + use<Self, E, F>, Self::Error>
       where F: FnMut((ActorId, Vec<u8>)) -> Option<(ActorId, E)>;
}

Required Associated Types§

Required Methods§

Source

async fn listen<E, F>( &self, f: F, ) -> Result<impl Stream<Item = (ActorId, E)> + Unpin + use<Self, E, F>, Self::Error>
where F: FnMut((ActorId, Vec<u8>)) -> Option<(ActorId, E)>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§