pub struct TcpConnect { /* private fields */ }
Expand description
Create new TCP connections.
Implementations§
source§impl TcpConnect
impl TcpConnect
sourcepub fn new(addr: SocketAddr) -> Self
pub fn new(addr: SocketAddr) -> Self
Create new TCP connections.
addr is the destination address to connect to.
Trait Implementations§
source§impl AsyncConnect for TcpConnect
impl AsyncConnect for TcpConnect
source§type Connection = TcpStream
type Connection = TcpStream
The type of an established connection.
source§type Fut = Pin<Box<dyn Future<Output = Result<<TcpConnect as AsyncConnect>::Connection, Error>> + Sync + Send>>
type Fut = Pin<Box<dyn Future<Output = Result<<TcpConnect as AsyncConnect>::Connection, Error>> + Sync + Send>>
The future establishing the connection.
source§impl Clone for TcpConnect
impl Clone for TcpConnect
source§fn clone(&self) -> TcpConnect
fn clone(&self) -> TcpConnect
Returns a copy 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 Debug for TcpConnect
impl Debug for TcpConnect
impl Copy for TcpConnect
Auto Trait Implementations§
impl Freeze for TcpConnect
impl RefUnwindSafe for TcpConnect
impl Send for TcpConnect
impl Sync for TcpConnect
impl Unpin for TcpConnect
impl UnwindSafe for TcpConnect
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.