pub trait InjectedWebSocket: Send + Sync {
// Required methods
fn send(
&self,
data: String,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + '_>>;
fn receive(
&self,
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + '_>>;
fn close(
&self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + '_>>;
}Expand description
WebSocket interface for injected mode.