pub struct Connection { /* private fields */ }Expand description
A QUIC connection.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn remote_address(&self) -> Option<SocketAddr>
pub fn remote_address(&self) -> Option<SocketAddr>
Returns the peer address for a network-backed connection.
pub async fn open_bi(&self) -> Result<(SendStream, RecvStream)>
pub async fn open_uni(&self) -> Result<SendStream>
pub async fn accept_bi(&self) -> Result<(SendStream, RecvStream)>
pub async fn accept_uni(&self) -> Result<RecvStream>
pub async fn send_datagram(&self, data: Bytes) -> Result<()>
Sourcepub async fn recv_datagram(&self) -> Result<Bytes>
pub async fn recv_datagram(&self) -> Result<Bytes>
Receives the next UDP datagram from this connection’s peer.
pub async fn close(&self)
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Connection
impl !UnwindSafe for Connection
impl Freeze for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin 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