pub trait ChainSegment: Send {
// Required methods
fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut RuntimeContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut RuntimeContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
runtime: &'life1 mut RuntimeContext,
ckpt: &'life2 CheckpointContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn on_checkpoint_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
runtime: &'life1 mut RuntimeContext,
ckpt: &'life2 CheckpointContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn drain_counters(&mut self) -> (u64, u64) { ... }
fn collect_metrics(&self) -> HashMap<String, f64> { ... }
}Expand description
One step in an operator chain (same subtask, in-process).
Required Methods§
fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut RuntimeContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut RuntimeContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
runtime: &'life1 mut RuntimeContext,
ckpt: &'life2 CheckpointContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_checkpoint_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
runtime: &'life1 mut RuntimeContext,
ckpt: &'life2 CheckpointContext,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
Sourcefn drain_counters(&mut self) -> (u64, u64)
fn drain_counters(&mut self) -> (u64, u64)
Returns (input_delta, output_delta) and resets the internal last-pointers
Sourcefn collect_metrics(&self) -> HashMap<String, f64>
fn collect_metrics(&self) -> HashMap<String, f64>
Delegates to the underlying operator for custom metrics
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".