Handler

Trait Handler 

Source
pub trait Handler: Send + Sync {
    // Required method
    fn handle<T>(
        &self,
        stream: &mut Stream<T>,
        request: Request,
    ) -> impl Future<Output = Result<()>> + Send
       where T: AsyncRead + AsyncWrite + Unpin + Send + Sync;
}
Expand description

Request handler trait for SOCKS5 server

Required Methods§

Source

fn handle<T>( &self, stream: &mut Stream<T>, request: Request, ) -> impl Future<Output = Result<()>> + Send
where T: AsyncRead + AsyncWrite + Unpin + Send + Sync,

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§