pub struct TcpConnection { /* private fields */ }
Expand description
TCP connection implementation
Trait Implementations§
Source§impl Connection for TcpConnection
impl Connection for TcpConnection
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 TcpConnection
impl RefUnwindSafe for TcpConnection
impl Send for TcpConnection
impl Sync for TcpConnection
impl Unpin for TcpConnection
impl UnwindSafe for TcpConnection
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