Trait graphql_ws_client::Connection
source · pub trait Connection {
// Required methods
fn receive(&mut self) -> BoxFuture<'_, Option<Message>>;
fn send(&mut self, message: Message) -> BoxFuture<'_, Result<(), Error>>;
}
Expand description
Abstrction around a websocket connection.
Built in implementations are provided for ws_stream_wasm
& async_tungstenite
.
If users wish to add support for a new client they should implement this trait.