1 2 3 4 5 6 7 8 9 10 11 12 13
use futures::Stream; use tonic::Status; #[tonic::async_trait] pub trait Upsert { type Row; type Bucket; async fn upsert<S>(&self, bucket: Self::Bucket, rows: S) -> Result<u64, Status> where S: Stream<Item = Result<Self::Row, Status>>; }