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;
// Provided methods
fn supports_data_v2() -> bool { ... }
fn forward_local_to_remote_with_codec<'a, R, W>(
codec: Option<DataCodec>,
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§
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>>
Provided Methods§
Sourcefn supports_data_v2() -> bool
fn supports_data_v2() -> bool
Custom transports keep the legacy data format unless they implement the negotiated forwarding method and explicitly advertise support.
Sourcefn forward_local_to_remote_with_codec<'a, R, W>(
codec: Option<DataCodec>,
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>>
fn forward_local_to_remote_with_codec<'a, R, W>( codec: Option<DataCodec>, 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>>
Forward using the format explicitly selected in the authenticated setup.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".