Trait workflow_rpc::server::ProtocolHandler
source · pub trait ProtocolHandler<ServerContext, ConnectionContext, Ops>: DowncastSync + Sized + Send + Syncwhere
Ops: OpsT,
ServerContext: Clone + Send + Sync + 'static,
ConnectionContext: Clone + Send + Sync + 'static,{
fn new(
methods: Arc<Interface<ServerContext, ConnectionContext, Ops>>
) -> Self
where
Self: Sized;
fn encoding(&self) -> Encoding;
fn handle_message<'life0, 'life1, 'async_trait>(
&'life0 self,
connection_ctx: ConnectionContext,
message: Message,
sink: &'life1 WebSocketSink
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Base trait for BorshProtocol
and SerdeJsonProtocol
protocol handlers