pub struct QuinnConnection { /* private fields */ }Expand description
Wrapper around a Quinn connection implementing the Connection trait.
Implementations§
Source§impl QuinnConnection
impl QuinnConnection
Sourcepub const fn new(connection: Connection) -> QuinnConnection
pub const fn new(connection: Connection) -> QuinnConnection
Creates a new QuinnConnection from a Quinn connection.
Sourcepub const fn inner(&self) -> &Connection
pub const fn inner(&self) -> &Connection
Returns a reference to the underlying Quinn connection.
Sourcepub fn into_inner(self) -> Connection
pub fn into_inner(self) -> Connection
Consumes this wrapper and returns the underlying Quinn connection.
Trait Implementations§
Source§impl Clone for QuinnConnection
impl Clone for QuinnConnection
Source§fn clone(&self) -> QuinnConnection
fn clone(&self) -> QuinnConnection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Connection for QuinnConnection
impl Connection for QuinnConnection
Source§type SendStream = QuinnSendStream
type SendStream = QuinnSendStream
The send stream type produced by this connection.
Source§type RecvStream = QuinnRecvStream
type RecvStream = QuinnRecvStream
The receive stream type produced by this connection.
Source§type OpenError = ConnectionError
type OpenError = ConnectionError
Error type for opening streams.
Source§type AcceptError = ConnectionError
type AcceptError = ConnectionError
Error type for accepting streams.
Source§async fn open_bi(
&self,
) -> Result<(<QuinnConnection as Connection>::SendStream, <QuinnConnection as Connection>::RecvStream), <QuinnConnection as Connection>::OpenError>
async fn open_bi( &self, ) -> Result<(<QuinnConnection as Connection>::SendStream, <QuinnConnection as Connection>::RecvStream), <QuinnConnection as Connection>::OpenError>
Opens a new bidirectional stream. Read more
Source§async fn accept_bi(
&self,
) -> Result<Option<(<QuinnConnection as Connection>::SendStream, <QuinnConnection as Connection>::RecvStream)>, <QuinnConnection as Connection>::AcceptError>
async fn accept_bi( &self, ) -> Result<Option<(<QuinnConnection as Connection>::SendStream, <QuinnConnection as Connection>::RecvStream)>, <QuinnConnection as Connection>::AcceptError>
Accepts an incoming bidirectional stream. Read more
Source§impl From<Connection> for QuinnConnection
impl From<Connection> for QuinnConnection
Source§fn from(connection: Connection) -> QuinnConnection
fn from(connection: Connection) -> QuinnConnection
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QuinnConnection
impl RefUnwindSafe for QuinnConnection
impl Send for QuinnConnection
impl Sync for QuinnConnection
impl Unpin for QuinnConnection
impl UnwindSafe for QuinnConnection
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