Struct trillium_async_std::TcpConnector
source · [−]pub struct TcpConnector;
Expand description
trillium client tcp connector for async-std
Trait Implementations
sourceimpl Clone for TcpConnector
impl Clone for TcpConnector
sourcefn clone(&self) -> TcpConnector
fn clone(&self) -> TcpConnector
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Connector for TcpConnector
impl Connector for TcpConnector
type Config = ClientConfig
type Config = ClientConfig
A type that can be used to configure this Connector. It will be passed into [
Connector::connect
].type Transport = TcpStream
type Transport = TcpStream
The async read + write type for this connector, often a TcpStream or TlSStream
sourcefn peer_addr(transport: &Self::Transport) -> Result<SocketAddr>
fn peer_addr(transport: &Self::Transport) -> Result<SocketAddr>
A SocketAddr representation of the other side of this connection
sourcefn connect<'life0, 'life1, 'async_trait>(
url: &'life0 Url,
config: &'life1 Self::Config
) -> Pin<Box<dyn Future<Output = Result<Self::Transport>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
url: &'life0 Url,
config: &'life1 Self::Config
) -> Pin<Box<dyn Future<Output = Result<Self::Transport>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Initiate a connection to the provided url, using the configuration. Read more
sourcefn spawn<Fut>(future: Fut)where
Fut: Future + Send + 'static,
<Fut as Future>::Output: Send,
fn spawn<Fut>(future: Fut)where
Fut: Future + Send + 'static,
<Fut as Future>::Output: Send,
Spawn and detach a task on the runtime. Although this may seem
unrelated to the purpose of a tcp connector, it is required as a
workaround for the absence of async drop in order to enable
keepalive connection pooling. TLS implementations that wrap a
runtime implementation should call through to the inner spawn. Read more
sourceimpl Debug for TcpConnector
impl Debug for TcpConnector
impl Copy for TcpConnector
Auto Trait Implementations
impl RefUnwindSafe for TcpConnector
impl Send for TcpConnector
impl Sync for TcpConnector
impl Unpin for TcpConnector
impl UnwindSafe for TcpConnector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more