Skip to main content

StreamForward

Trait StreamForward 

Source
pub trait StreamForward: StreamSplit + Sized {
    // Required method
    fn forward_local_to_remote<'a, R, W>(
        codec_key: Option<AesKeyType>,
        framing_key: AesKeyType,
        local_reader: Self::ReaderRef<'a>,
        local_writer: Self::WriterRef<'a>,
        remote_reader: R,
        remote_writer: W,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
       where R: AsyncReadExt + Unpin + Send + 'a,
             W: AsyncWriteExt + Unpin + Send + 'a;
}

Required Methods§

Source

fn forward_local_to_remote<'a, R, W>( codec_key: Option<AesKeyType>, framing_key: AesKeyType, local_reader: Self::ReaderRef<'a>, local_writer: Self::WriterRef<'a>, remote_reader: R, remote_writer: W, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
where R: AsyncReadExt + Unpin + Send + 'a, W: AsyncWriteExt + Unpin + Send + 'a,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StreamForward for TcpStreamImpl

Source§

fn forward_local_to_remote<'a, R, W>( codec_key: Option<AesKeyType>, framing_key: AesKeyType, local_reader: Self::ReaderRef<'a>, local_writer: Self::WriterRef<'a>, remote_reader: R, remote_writer: W, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
where R: AsyncReadExt + Unpin + Send + 'a, W: AsyncWriteExt + Unpin + Send + 'a,

Source§

impl StreamForward for UdpStreamImpl

Source§

fn forward_local_to_remote<'a, R, W>( codec_key: Option<AesKeyType>, framing_key: AesKeyType, local_reader: Self::ReaderRef<'a>, local_writer: Self::WriterRef<'a>, remote_reader: R, remote_writer: W, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
where R: AsyncReadExt + Unpin + Send + 'a, W: AsyncWriteExt + Unpin + Send + 'a,

Implementors§