Trait graphql_ws_client::Connection
source · pub trait Connection {
// Required methods
fn receive(&mut self) -> impl Future<Output = Option<Message>> + Send;
fn send(
&mut self,
message: Message,
) -> impl Future<Output = Result<(), Error>> + Send;
}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.
Required Methods§
Object Safety§
This trait is not object safe.