Trait salvo_core::proto::quic::OpenStreams
source · pub trait OpenStreams<B>where
B: Buf,{
type BidiStream: SendStream<B> + RecvStream;
type SendStream: SendStream<B>;
type RecvStream: RecvStream;
type Error: Into<Box<dyn Error>>;
// Required methods
fn poll_open_bidi(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<Self::BidiStream, Self::Error>>;
fn poll_open_send(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<Self::SendStream, Self::Error>>;
fn close(&mut self, code: Code, reason: &[u8]);
}
Available on crate feature
quinn
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()
sourcetype RecvStream: RecvStream
type RecvStream: RecvStream
The type of the receiving part of BidiStream
Required Methods§
sourcefn poll_open_bidi(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<Self::BidiStream, Self::Error>>
fn poll_open_bidi( &mut self, cx: &mut Context<'_> ) -> Poll<Result<Self::BidiStream, Self::Error>>
Poll the connection to create a new bidirectional stream.
sourcefn poll_open_send(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<Self::SendStream, Self::Error>>
fn poll_open_send( &mut self, cx: &mut Context<'_> ) -> Poll<Result<Self::SendStream, Self::Error>>
Poll the connection to create a new unidirectional stream.