pub trait OpenStreams<B>where
B: Buf,{
type BidiStream: SendStream<B> + RecvStream;
type SendStream: SendStream<B>;
// Required methods
fn poll_open_bidi(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Self::BidiStream, StreamErrorIncoming>>;
fn poll_open_send(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Self::SendStream, StreamErrorIncoming>>;
fn close(&mut self, code: Code, reason: &[u8]);
}Available on crate feature
h3 only.Expand description
Trait for opening outgoing streams
Required Associated Types§
Sourcetype BidiStream: SendStream<B> + RecvStream
type BidiStream: SendStream<B> + RecvStream
The type produced by poll_open_bidi()
Sourcetype SendStream: SendStream<B>
type SendStream: SendStream<B>
The type produced by poll_open_send()
Required Methods§
Sourcefn poll_open_bidi(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Self::BidiStream, StreamErrorIncoming>>
fn poll_open_bidi( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::BidiStream, StreamErrorIncoming>>
Poll the connection to create a new bidirectional stream.
Sourcefn poll_open_send(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Self::SendStream, StreamErrorIncoming>>
fn poll_open_send( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::SendStream, StreamErrorIncoming>>
Poll the connection to create a new unidirectional stream.