pub struct QuicConnection { /* private fields */ }
Expand description
QUIC connection implementation
Implementations§
Source§impl QuicConnection
impl QuicConnection
Sourcepub async fn active_stream_count(&self) -> usize
pub async fn active_stream_count(&self) -> usize
Get count of active streams
Sourcepub fn supports_migration(&self) -> bool
pub fn supports_migration(&self) -> bool
Check if connection supports migration
Sourcepub fn connection_stats(&self) -> ConnectionStats
pub fn connection_stats(&self) -> ConnectionStats
Get connection statistics
Sourcepub async fn try_migrate(&self, new_addr: SocketAddr) -> Result<()>
pub async fn try_migrate(&self, new_addr: SocketAddr) -> Result<()>
Migrate connection to new network path
Trait Implementations§
Source§impl Connection for QuicConnection
impl Connection for QuicConnection
Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send data over the connection
Source§fn receive<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive data from the connection
Source§fn info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ConnectionInfo> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ConnectionInfo> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get connection info
Source§fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the connection
Source§fn is_alive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_alive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if connection is alive
Source§fn measure_quality<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConnectionQuality>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn measure_quality<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConnectionQuality>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Measure connection quality
Source§fn local_addr(&self) -> Multiaddr
fn local_addr(&self) -> Multiaddr
Get local address
Source§fn remote_addr(&self) -> Multiaddr
fn remote_addr(&self) -> Multiaddr
Get remote address
Auto Trait Implementations§
impl Freeze for QuicConnection
impl !RefUnwindSafe for QuicConnection
impl Send for QuicConnection
impl Sync for QuicConnection
impl Unpin for QuicConnection
impl !UnwindSafe for QuicConnection
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