pub struct Connection {
pub(crate) conn: Connection,
pub(crate) incoming_bi: Pin<Box<dyn Stream<Item = <AcceptBi<'static> as Future>::Output> + Sync + Send + 'static>>,
pub(crate) opening_bi: Option<Pin<Box<dyn Stream<Item = <OpenBi<'static> as Future>::Output> + Sync + Send + 'static>>>,
pub(crate) incoming_uni: Pin<Box<dyn Stream<Item = <AcceptUni<'static> as Future>::Output> + Sync + Send + 'static>>,
pub(crate) opening_uni: Option<Pin<Box<dyn Stream<Item = <OpenUni<'static> as Future>::Output> + Sync + Send + 'static>>>,
}Expand description
A QUIC connection backed by Quinn
Implements a [quic::Connection] backed by a [quinn::Connection].
Fields§
§conn: Connection§incoming_bi: Pin<Box<dyn Stream<Item = <AcceptBi<'static> as Future>::Output> + Sync + Send + 'static>>§opening_bi: Option<Pin<Box<dyn Stream<Item = <OpenBi<'static> as Future>::Output> + Sync + Send + 'static>>>§incoming_uni: Pin<Box<dyn Stream<Item = <AcceptUni<'static> as Future>::Output> + Sync + Send + 'static>>§opening_uni: Option<Pin<Box<dyn Stream<Item = <OpenUni<'static> as Future>::Output> + Sync + Send + 'static>>>Implementations§
Source§impl Connection
impl Connection
Sourcepub fn new(conn: Connection) -> Self
pub fn new(conn: Connection) -> Self
Create a Connection from a [quinn::Connection]
Trait Implementations§
Source§impl<B> Connection<B> for Connectionwhere B: Buf,
impl<B> Connection<B> for Connectionwhere B: Buf,
Source§type RecvStream = RecvStream
type RecvStream = RecvStream
The type produced by
poll_accept_recv()Source§type OpenStreams = OpenStreams
type OpenStreams = OpenStreams
A producer of outgoing Unidirectional and Bidirectional streams.
Source§fn poll_accept_bidi( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::BidiStream, ConnectionErrorIncoming>>
fn poll_accept_bidi( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::BidiStream, ConnectionErrorIncoming>>
Accept an incoming bidirectional stream Read more
Source§impl<B> OpenStreams<B> for Connectionwhere B: Buf,
impl<B> OpenStreams<B> for Connectionwhere B: Buf,
Source§type SendStream = SendStream<B>
type SendStream = SendStream<B>
The type produced by
poll_open_send()Source§type BidiStream = BidiStream<B>
type BidiStream = BidiStream<B>
The type produced by
poll_open_bidi()Source§fn 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.
Auto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more