pub trait PollStrategy {
type Stream: Stream + Send;
// Required method
fn poll_strategy(self: Box<Self>, ctx: &PollContext) -> Self::Stream;
}Expand description
A trait for different polling strategies All strategies can be combined in a race condition
Required Associated Types§
Required Methods§
Sourcefn poll_strategy(self: Box<Self>, ctx: &PollContext) -> Self::Stream
fn poll_strategy(self: Box<Self>, ctx: &PollContext) -> Self::Stream
Create a stream that completes when the next poll should occur
Implementors§
Source§impl PollStrategy for BackoffStrategy
Available on crate feature sleep only.
impl PollStrategy for BackoffStrategy
Available on crate feature
sleep only.Source§impl PollStrategy for IntervalStrategy
Available on crate feature sleep only.
impl PollStrategy for IntervalStrategy
Available on crate feature
sleep only.