pub struct Connection {
pub local_addr: Address,
pub peer_addr: Address,
/* private fields */
}
Expand description
§Connection
I/O Object for managing Tcp connections.
A new connection can be created by connecting to an endpoint using Connection::new()
constructor.
Fields§
§local_addr: Address
§peer_addr: Address
Implementations§
Trait Implementations§
Source§impl ReadPreReqs for Connection
impl ReadPreReqs for Connection
Source§impl Reader for Connection
impl Reader for Connection
fn read_u8<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u8>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_u16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u16>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_u32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_u64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_u128<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u128>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_i8<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i8>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_i16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i16>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_i32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_i64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_i128<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i128>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_f32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<f32>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_f64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<f64>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn read_string<'life0, 'async_trait>(
&'life0 mut self,
len: usize,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Source§impl TryFrom<TcpStream> for Connection
impl TryFrom<TcpStream> for Connection
Source§impl WritePreReqs for Connection
impl WritePreReqs for Connection
Source§impl Writer for Connection
impl Writer for Connection
fn write_u8<'life0, 'async_trait>(
&'life0 mut self,
data: u8,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_u16<'life0, 'async_trait>(
&'life0 mut self,
data: u16,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_u32<'life0, 'async_trait>(
&'life0 mut self,
data: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_u64<'life0, 'async_trait>(
&'life0 mut self,
data: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_u128<'life0, 'async_trait>(
&'life0 mut self,
data: u128,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_i8<'life0, 'async_trait>(
&'life0 mut self,
data: i8,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_i16<'life0, 'async_trait>(
&'life0 mut self,
data: i16,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_i32<'life0, 'async_trait>(
&'life0 mut self,
data: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_i64<'life0, 'async_trait>(
&'life0 mut self,
data: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_i128<'life0, 'async_trait>(
&'life0 mut self,
data: i128,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_f32<'life0, 'async_trait>(
&'life0 mut self,
data: f32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_f64<'life0, 'async_trait>(
&'life0 mut self,
data: f64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_string<'life0, 'async_trait>(
&'life0 mut self,
data: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
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