Trait mz_dataflow_types::client::GenericClient
source · [−]pub trait GenericClient<C, R>: Debug + Send {
fn send<'life0, 'async_trait>(
&'life0 mut self,
cmd: C
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn recv<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<R>, Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn as_stream<'a>(
&'a mut self
) -> Pin<Box<dyn Stream<Item = Result<R, Error>> + Send + 'a>>
where
R: Send + 'a,
{ ... }
}
Expand description
A client to a running dataflow server.
Required methods
Sends a command to the dataflow server.
The command can error for various reasons.
Receives the next response from the dataflow server.
This method blocks until the next response is available, or, if the
dataflow server has been shut down, returns None
.