1
2
3
4
5
6
7
8
9
use tonic::Status;

/// Tries to save a row.
#[tonic::async_trait]
pub trait DataTarget: Sync + Send + 'static {
    type Row;

    async fn save(&self, row: &Self::Row) -> Result<(), Status>;
}