pub trait PollPolicy {
type Error;
// Required method
fn decide(
&mut self,
context: PollContext,
) -> Result<PollDecision, Self::Error>;
}Expand description
Caller-supplied delay, backoff, timeout, and cancellation policy.
Required Associated Types§
Required Methods§
Sourcefn decide(&mut self, context: PollContext) -> Result<PollDecision, Self::Error>
fn decide(&mut self, context: PollContext) -> Result<PollDecision, Self::Error>
Chooses the next explicit step after a running observation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".