rs_split_table/source.rs
1//! Data source traits.
2
3use futures::Stream;
4
5use tonic::Status;
6
7/// Tries to get rows.
8#[tonic::async_trait]
9pub trait DataSource: Sync + Send + 'static {
10 type Row;
11 type Rows: Stream<Item = Result<Self::Row, Status>>;
12
13 async fn get_rows(&self) -> Result<Self::Rows, Status>;
14}