Skip to main content

EventReceiver

Trait EventReceiver 

Source
pub trait EventReceiver<T>: Send
where T: Send,
{ // Required method fn recv( &mut self, ) -> impl Future<Output = Result<T, EventChannelError>> + Send; }
Expand description

Receiver side of an event channel.

Required Methods§

Source

fn recv(&mut self) -> impl Future<Output = Result<T, EventChannelError>> + Send

Receives the next value.

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.

Implementors§

Source§

impl<T: Clone + Send + 'static> EventReceiver<T> for FanoutReceiver<T>