use async_trait::async_trait;
use tokio::sync::mpsc::Sender;

use crate::chopper::error::Result;
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>>) -> Result<()>;
}
