[][src]Struct tokio_proto::TcpClient

pub struct TcpClient<Kind, P> { /* fields omitted */ }

Builds client connections to external services.

To connect to a service, you need a client protocol implementation; see the crate documentation for guidance.

At the moment, this builder offers minimal configuration, but more will be added over time.

Methods

impl<Kind, P> TcpClient<Kind, P> where
    P: BindClient<Kind, TcpStream>, 
[src]

pub fn new(protocol: P) -> TcpClient<Kind, P>[src]

Create a builder for the given client protocol.

To connect to a service, you need a client protocol implementation; see the crate documentation for guidance.

pub fn connect(&self, addr: &SocketAddr, handle: &Handle) -> Connect<Kind, P>[src]

Establish a connection to the given address.

Return value

Returns a future for the establishment of the connection. When the future completes, it yields an instance of Service for interacting with the server.

Trait Implementations

impl<Kind: Debug, P: Debug> Debug for TcpClient<Kind, P>[src]

Auto Trait Implementations

impl<Kind, P> RefUnwindSafe for TcpClient<Kind, P> where
    Kind: RefUnwindSafe,
    P: RefUnwindSafe

impl<Kind, P> Send for TcpClient<Kind, P> where
    Kind: Send,
    P: Send + Sync

impl<Kind, P> Sync for TcpClient<Kind, P> where
    Kind: Sync,
    P: Send + Sync

impl<Kind, P> Unpin for TcpClient<Kind, P> where
    Kind: Unpin

impl<Kind, P> UnwindSafe for TcpClient<Kind, P> where
    Kind: UnwindSafe,
    P: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.