Skip to main content

InjectedWebSocket

Trait InjectedWebSocket 

Source
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.

Required Methods§

Source

fn send( &self, data: String, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + '_>>

Source

fn receive( &self, ) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + '_>>

Source

fn close( &self, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + '_>>

Implementors§