1 2 3 4 5 6 7 8 9 10 11
use async_trait::async_trait;
use tokio::sync::mpsc::Sender;
use crate::chopper::error::ChopperResult;
use crate::chopper::types::Row;
#[async_trait]
pub trait Functor: Send {
//TODO return value is not very useful? look at implementations
async fn write(&mut self, row: Box<Row>, output: &mut Sender<Box<Row>>) -> ChopperResult<()>;
}