pub trait DemandSource:
Debug
+ Send
+ Sync {
// Required method
fn poll<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ActivityScope,
) -> Pin<Box<dyn Future<Output = PollOutcome> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Where this loop gets its demand from.
A port rather than a direct DemandGateway dependency, because the two
failures this loop must handle differently — unreachable and rate-limited —
are distinguished by RefreshState, and a test that wants to drive the
offline path should not have to manufacture a reqwest::Error to do it.
GatewayDemand is the one adapter that talks to c4.
Required Methods§
Sourcefn poll<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ActivityScope,
) -> Pin<Box<dyn Future<Output = PollOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn poll<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ActivityScope,
) -> Pin<Box<dyn Future<Output = PollOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Queued runs across scope, or why there are none to report.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".