Service

Trait Service 

pub trait Service {
    // Required methods
    async fn connect(
        &self,
        websocket_in: Sender<Bytes>,
        websocket_out: Receiver<Bytes>,
        close_in: Sender<()>,
    ) -> Result<()>;
    async fn bind(
        &self,
        websocket_in: Sender<Bytes>,
        websocket_out: Receiver<Bytes>,
        close_in: Sender<()>,
    ) -> Result<()>;
}
Expand description

A trait for giving a service both source and destination implementations for communicating over the AWS localproxy protocol.

Required Methods§

async fn connect( &self, websocket_in: Sender<Bytes>, websocket_out: Receiver<Bytes>, close_in: Sender<()>, ) -> Result<()>

Manages the destination communication through a WebSocket.

async fn bind( &self, websocket_in: Sender<Bytes>, websocket_out: Receiver<Bytes>, close_in: Sender<()>, ) -> Result<()>

Initiates and manages the source communication through a WebSocket.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§