pub trait FeedSource {
type Item;
// Required methods
fn wait(&mut self) -> impl Future<Output = Option<Self::Item>>;
fn poll_now(&mut self) -> Option<Self::Item>;
}Expand description
Something a control loop waits on and then drains: one awaited receive for
the select! arm, and a non-blocking receive for the batch that follows.
Required Associated Types§
Required Methods§
Sourcefn wait(&mut self) -> impl Future<Output = Option<Self::Item>>
fn wait(&mut self) -> impl Future<Output = Option<Self::Item>>
Cancel-safe: a wait that loses the race must not drop a message.
fn poll_now(&mut self) -> Option<Self::Item>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".