pub trait ResequencePolicy:
Send
+ Sync
+ 'static {
// Required methods
fn accept<'life0, 'async_trait>(
&'life0 self,
input: Exchange,
) -> Pin<Box<dyn Future<Output = Vec<Exchange>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<Exchange>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn name(&self) -> &'static str;
// Provided method
fn set_timeout_tx(&self, _tx: Sender<Exchange>) { ... }
}Expand description
Buffer / ordering policy for a resequencer.
Implementations (batch, stream) live in sibling modules.
Required Methods§
Sourcefn accept<'life0, 'async_trait>(
&'life0 self,
input: Exchange,
) -> Pin<Box<dyn Future<Output = Vec<Exchange>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept<'life0, 'async_trait>(
&'life0 self,
input: Exchange,
) -> Pin<Box<dyn Future<Output = Vec<Exchange>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Accept an input; return the list of now-ready exchanges (in emit order).
Provided Methods§
Sourcefn set_timeout_tx(&self, _tx: Sender<Exchange>)
fn set_timeout_tx(&self, _tx: Sender<Exchange>)
Set the driver channel for timeout-triggered emissions.
Default is a no-op. BatchPolicy overrides this to receive
the channel that feeds the post-driver.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".