Trait hydro_deploy::hydroflow_crate::ports::HydroflowSink
source · pub trait HydroflowSink: Send + Sync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn instantiate(
&self,
client_path: &SourcePath,
) -> Result<Box<dyn FnOnce() -> ServerConfig>>;
fn instantiate_reverse(
&self,
server_host: &Arc<dyn Host>,
server_sink: Arc<dyn HydroflowServer>,
wrap_client_port: &dyn Fn(ServerConfig) -> ServerConfig,
) -> Result<ReverseSinkInstantiator>;
}
Required Methods§
fn as_any(&self) -> &dyn Any
sourcefn instantiate(
&self,
client_path: &SourcePath,
) -> Result<Box<dyn FnOnce() -> ServerConfig>>
fn instantiate( &self, client_path: &SourcePath, ) -> Result<Box<dyn FnOnce() -> ServerConfig>>
Instantiate the sink as the source host connecting to the sink host. Returns a thunk that can be called to perform mutations that instantiate the sink.
sourcefn instantiate_reverse(
&self,
server_host: &Arc<dyn Host>,
server_sink: Arc<dyn HydroflowServer>,
wrap_client_port: &dyn Fn(ServerConfig) -> ServerConfig,
) -> Result<ReverseSinkInstantiator>
fn instantiate_reverse( &self, server_host: &Arc<dyn Host>, server_sink: Arc<dyn HydroflowServer>, wrap_client_port: &dyn Fn(ServerConfig) -> ServerConfig, ) -> Result<ReverseSinkInstantiator>
Instantiate the sink, but as the sink host connecting to the source host. Returns a thunk that can be called to perform mutations that instantiate the sink, taking a mutable reference to this sink.