pub trait StreamOperator:
Send
+ Sync
+ Debug {
// Required methods
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Vec<u8>,
ctx: &'life1 OperatorContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn name(&self) -> &str;
// Provided methods
fn open<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait for stream operators
All stream processing operators implement this trait to provide a uniform interface for processing events in the pipeline.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".