pub trait BidiStream<B>: SendStream<B> + RecvStreamwhere
B: Buf,{
type SendStream: SendStream<B>;
type RecvStream: RecvStream;
// Required method
fn split(self) -> (Self::SendStream, Self::RecvStream);
}Available on crate feature
h3 only.Expand description
Optional trait to allow “splitting” a bidirectional stream into two sides.
Required Associated Types§
Sourcetype SendStream: SendStream<B>
type SendStream: SendStream<B>
The type for the send half.
Sourcetype RecvStream: RecvStream
type RecvStream: RecvStream
The type for the receive half.
Required Methods§
Sourcefn split(self) -> (Self::SendStream, Self::RecvStream)
fn split(self) -> (Self::SendStream, Self::RecvStream)
Split this stream into two halves.
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.