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§
async fn listen<E, F>( &self, f: F, ) -> Result<impl Stream<Item = (ActorId, E)> + Unpin + use<Self, E, F>, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".