[−][src]Struct tokio_proto::TcpClient
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]
P: BindClient<Kind, TcpStream>,
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
Auto Trait Implementations
impl<Kind, P> RefUnwindSafe for TcpClient<Kind, P> where
Kind: RefUnwindSafe,
P: RefUnwindSafe,
Kind: RefUnwindSafe,
P: RefUnwindSafe,
impl<Kind, P> Send for TcpClient<Kind, P> where
Kind: Send,
P: Send + Sync,
Kind: Send,
P: Send + Sync,
impl<Kind, P> Sync for TcpClient<Kind, P> where
Kind: Sync,
P: Send + Sync,
Kind: Sync,
P: Send + Sync,
impl<Kind, P> Unpin for TcpClient<Kind, P> where
Kind: Unpin,
Kind: Unpin,
impl<Kind, P> UnwindSafe for TcpClient<Kind, P> where
Kind: UnwindSafe,
P: RefUnwindSafe,
Kind: UnwindSafe,
P: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,