pub trait Listener {
type Error: Error;
// Required method
async fn listen<E, F: FnMut((ActorId, Vec<u8>)) -> Option<(ActorId, E)>>(
&self,
f: F,
) -> Result<impl Stream<Item = (ActorId, E)> + Unpin, Self::Error>;
}Required Associated Types§
Required Methods§
async fn listen<E, F: FnMut((ActorId, Vec<u8>)) -> Option<(ActorId, E)>>( &self, f: F, ) -> Result<impl Stream<Item = (ActorId, E)> + Unpin, Self::Error>
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.