| 1 |
use craterust-analyzer cargo async-tls 0.13.0 crate/::commonrust-analyzer cargo async-tls 0.13.0 common/::tls_staterust-analyzer cargo async-tls 0.13.0 common/tls_state/::TlsStaterust-analyzer cargo async-tls 0.13.0 common/tls_state/TlsState#; |
| 2 |
|
| 3 |
use craterust-analyzer cargo async-tls 0.13.0 crate/::clientrust-analyzer cargo async-tls 0.13.0 client/; |
| 4 |
|
| 5 |
use futures_iorust-analyzer cargo futures-io 0.3.34 crate/::{AsyncReadrust-analyzer cargo futures-io 0.3.34 if_std/AsyncRead#, AsyncWriterust-analyzer cargo futures-io 0.3.34 if_std/AsyncWrite#}; |
| •6 |
use rustlsrust-analyzer cargo rustls 0.23.43 crate/::pki_typesrust-analyzer cargo rustls 0.23.43 pki_types/::ServerNamerust-analyzer cargo rustls-pki-types 1.15.1 server_name/ServerName#; |
| 7 |
use rustlsrust-analyzer cargo rustls 0.23.43 crate/::{ClientConfigrust-analyzer cargo rustls 0.23.43 client/client_conn/ClientConfig#, ClientConnectionrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/ClientConnection#, RootCertStorerust-analyzer cargo rustls 0.23.43 webpki/anchors/RootCertStore#}; |
| 8 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::convertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/::TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#; |
| 9 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/::Futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#; |
| 10 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/; |
| 11 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/::Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#; |
| 12 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::syncrust-analyzer cargo std https://github.com/rust-lang/rust/library/std sync/::Arcrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/Arc#; |
| 13 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::taskrust-analyzer cargo std https://github.com/rust-lang/rust/library/std task/::{Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#, Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#}; |
| 14 |
|
| 15 |
/// The TLS connecting part. The acceptor drives |
| 16 |
/// the client side of the TLS handshake process. It works |
| 17 |
/// on any asynchronous stream. |
| 18 |
/// |
| 19 |
/// It provides a simple interface (`connect`), returning a future |
| 20 |
/// that will resolve when the handshake process completed. On |
| 21 |
/// success, it will hand you an async `TlsStream`. |
| 22 |
/// |
| 23 |
/// To create a `TlsConnector` with a non-default configuation, create |
| 24 |
/// a `rusttls::ClientConfig` and call `.into()` on it. |
| 25 |
/// |
| 26 |
/// ## Example |
| 27 |
/// |
| 28 |
/// ```rust |
| 29 |
/// use async_tls::TlsConnector; |
| 30 |
/// |
| 31 |
/// async_std::task::block_on(async { |
| 32 |
/// let connector = TlsConnector::default(); |
| 33 |
/// let tcp_stream = async_std::net::TcpStream::connect("example.com").await?; |
| 34 |
/// let encrypted_stream = connector.connect("example.com", tcp_stream).await?; |
| 35 |
/// |
| 36 |
/// Ok(()) as async_std::io::Result<()> |
| 37 |
/// }); |
| 38 |
/// ``` |
| 39 |
#[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 40 |
pub struct TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 41 |
innerrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#inner.: Arcrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/Arc#<ClientConfigrust-analyzer cargo rustls 0.23.43 client/client_conn/ClientConfig#>, |
| 42 |
#[cfg(feature = "early-data")] |
| 43 |
early_datarust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#early_data.: bool, |
| 44 |
} |
| 45 |
|
| 46 |
impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Arcrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/Arc#<ClientConfigrust-analyzer cargo rustls 0.23.43 client/client_conn/ClientConfig#>> for TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 47 |
fn fromrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector][`From<Arc<ClientConfig>>`]from().(inner: Arcrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/Arc#<ClientConfigrust-analyzer cargo rustls 0.23.43 client/client_conn/ClientConfig#>) -> TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 48 |
TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 49 |
innerrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#inner., |
| 50 |
#[cfg(feature = "early-data")] |
| 51 |
early_datarust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#early_data.: false, |
| 52 |
} |
| 53 |
} |
| 54 |
} |
| 55 |
|
| 56 |
impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<ClientConfigrust-analyzer cargo rustls 0.23.43 client/client_conn/ClientConfig#> for TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 57 |
fn fromrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector][`From<ClientConfig>`]from().(inner: ClientConfigrust-analyzer cargo rustls 0.23.43 client/client_conn/ClientConfig#) -> TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 58 |
TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 59 |
innerrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#inner.: Arcrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/Arc#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/impl#[`Arc<T>`]new().(inner), |
| 60 |
#[cfg(feature = "early-data")] |
| 61 |
early_datarust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#early_data.: false, |
| 62 |
} |
| 63 |
} |
| 64 |
} |
| 65 |
|
| 66 |
impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 67 |
fn defaultrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector][Default]default().() -> Selfrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector][Default] { |
| 68 |
let mut root_certs = RootCertStorerust-analyzer cargo rustls 0.23.43 webpki/anchors/RootCertStore#::emptyrust-analyzer cargo rustls 0.23.43 webpki/anchors/impl#[RootCertStore]empty().(); |
| •69 |
let result = rustls_native_certsrust-analyzer cargo rustls-native-certs 0.8.4 crate/::load_native_certsrust-analyzer cargo rustls-native-certs 0.8.4 load_native_certs().().expectrust-analyzer cargo rustls-native-certs 0.8.4 impl#[CertificateResult]expect().("Failed to load system root certificates"); |
| 70 |
root_certs.add_parsable_certificatesrust-analyzer cargo rustls 0.23.43 webpki/anchors/impl#[RootCertStore]add_parsable_certificates().(result); |
| 71 |
let config = ClientConfigrust-analyzer cargo rustls 0.23.43 client/client_conn/ClientConfig#::builderrust-analyzer cargo rustls 0.23.43 client/client_conn/impl#[ClientConfig]builder().() |
| 72 |
.with_root_certificatesrust-analyzer cargo rustls 0.23.43 client/builder/impl#[`ConfigBuilder<ClientConfig, WantsVerifier>`]with_root_certificates().(root_certs) |
| 73 |
.with_no_client_authrust-analyzer cargo rustls 0.23.43 client/builder/impl#[`ConfigBuilder<ClientConfig, WantsClientCert>`]with_no_client_auth().(); |
| 74 |
Arcrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/Arc#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/impl#[`Arc<T>`]new().(config).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
impl TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 79 |
/// Create a new TlsConnector with default configuration. |
| 80 |
/// |
| 81 |
/// This is the same as calling `TlsConnector::default()`. |
| 82 |
pub fn newrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector]new().() -> Selfrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector] { |
| 83 |
Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector][Default]default().() |
| 84 |
} |
| 85 |
|
| 86 |
/// Enable 0-RTT. |
| 87 |
/// |
| 88 |
/// You must also set `enable_early_data` to `true` in `ClientConfig`. |
| 89 |
#[cfg(feature = "early-data")] |
| 90 |
pub fn early_datarust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector]early_data().(mut self, flag: bool) -> TlsConnectorrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector# { |
| 91 |
self.early_datarust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#early_data. = flag; |
| 92 |
self |
| 93 |
} |
| 94 |
|
| 95 |
/// Connect to a server. `stream` can be any type implementing `AsyncRead` and `AsyncWrite`, |
| 96 |
/// such as TcpStreams or Unix domain sockets. |
| 97 |
/// |
| 98 |
/// The function will return a `Connect` Future, representing the connecting part of a Tls |
| 99 |
/// handshake. It will resolve when the handshake is over. |
| 100 |
#[inline] |
| 101 |
pub fn connectrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector]connect().<'a, IO>(&self, domain: impl AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<str>, stream: IO) -> Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#<IO> |
| 102 |
where |
| 103 |
IO: AsyncReadrust-analyzer cargo futures-io 0.3.34 if_std/AsyncRead# + AsyncWriterust-analyzer cargo futures-io 0.3.34 if_std/AsyncWrite# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#, |
| 104 |
{ |
| 105 |
self.connect_withrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector]connect_with().(domain, stream, |_| ()) |
| 106 |
} |
| 107 |
|
| 108 |
// NOTE: Currently private, exposing ClientConnection exposes rusttls |
| 109 |
// Early data should be exposed differently |
| 110 |
fn connect_withrust-analyzer cargo async-tls 0.13.0 connector/impl#[TlsConnector]connect_with().<'a, IO, F>(&self, domain: impl AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<str>, stream: IO, f: F) -> Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#<IO> |
| 111 |
where |
| 112 |
IO: AsyncReadrust-analyzer cargo futures-io 0.3.34 if_std/AsyncRead# + AsyncWriterust-analyzer cargo futures-io 0.3.34 if_std/AsyncWrite# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#, |
| 113 |
F: FnOncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/FnOnce#(&mut ClientConnectionrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/ClientConnection#), |
| 114 |
{ |
| 115 |
let domain = match ServerNamerust-analyzer cargo rustls-pki-types 1.15.1 server_name/ServerName#::try_fromrust-analyzer cargo rustls-pki-types 1.15.1 server_name/impl#[`ServerName<'a>`][`TryFrom<&'a str>`]try_from().(domain.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().()) { |
| •116 |
Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(domain) => domain.to_ownedrust-analyzer cargo rustls-pki-types 1.15.1 server_name/impl#[`ServerName<'_>`]to_owned().(), |
| 117 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(_) => { |
| 118 |
return Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#(ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#::Errorrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Error#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]new().( |
| 119 |
iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 120 |
"invalid domain", |
| 121 |
)))) |
| 122 |
} |
| 123 |
}; |
| 124 |
|
| 125 |
let mut session = match ClientConnectionrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/ClientConnection#::newrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/impl#[ClientConnection]new().(self.innerrust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#inner..clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/impl#[`Arc<T, A>`][Clone]clone().(), domain) { |
| 126 |
Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(session) => session, |
| 127 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(_) => { |
| 128 |
return Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#(ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#::Errorrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Error#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]new().( |
| 129 |
iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::Otherrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#Other#, |
| 130 |
"invalid connection", |
| 131 |
)))) |
| 132 |
} |
| 133 |
}; |
| 134 |
|
| 135 |
f(&mut session); |
| 136 |
|
| 137 |
#[cfg(not(feature = "early-data"))] |
| 138 |
{ |
| 139 |
Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#(ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#::Handshakerust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Handshake#(clientrust-analyzer cargo async-tls 0.13.0 client/::MidHandshakerust-analyzer cargo async-tls 0.13.0 client/MidHandshake#::Handshakingrust-analyzer cargo async-tls 0.13.0 client/MidHandshake#Handshaking#( |
| 140 |
clientrust-analyzer cargo async-tls 0.13.0 client/::TlsStreamrust-analyzer cargo async-tls 0.13.0 client/TlsStream# { |
| 141 |
session, |
| 142 |
io: stream, |
| 143 |
state: TlsStaterust-analyzer cargo async-tls 0.13.0 common/tls_state/TlsState#::Streamrust-analyzer cargo async-tls 0.13.0 common/tls_state/TlsState#Stream#, |
| 144 |
}, |
| 145 |
))) |
| 146 |
} |
| 147 |
|
| 148 |
#[cfg(feature = "early-data")] |
| 149 |
{ |
| 150 |
Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#(ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#::Handshakerust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Handshake#(if self.early_datarust-analyzer cargo async-tls 0.13.0 connector/TlsConnector#early_data. { |
| 151 |
clientrust-analyzer cargo async-tls 0.13.0 client/::MidHandshakerust-analyzer cargo async-tls 0.13.0 client/MidHandshake#::EarlyDatarust-analyzer cargo async-tls 0.13.0 client/MidHandshake#EarlyData#(clientrust-analyzer cargo async-tls 0.13.0 client/::TlsStreamrust-analyzer cargo async-tls 0.13.0 client/TlsStream# { |
| 152 |
sessionrust-analyzer cargo async-tls 0.13.0 client/TlsStream#session., |
| 153 |
iorust-analyzer cargo async-tls 0.13.0 client/TlsStream#io.: stream, |
| 154 |
staterust-analyzer cargo async-tls 0.13.0 client/TlsStream#state.: TlsStaterust-analyzer cargo async-tls 0.13.0 common/tls_state/TlsState#::EarlyDatarust-analyzer cargo async-tls 0.13.0 common/tls_state/TlsState#EarlyData#, |
| 155 |
early_datarust-analyzer cargo async-tls 0.13.0 client/TlsStream#early_data.: (0, Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().()), |
| 156 |
}) |
| 157 |
} else { |
| 158 |
clientrust-analyzer cargo async-tls 0.13.0 client/::MidHandshakerust-analyzer cargo async-tls 0.13.0 client/MidHandshake#::Handshakingrust-analyzer cargo async-tls 0.13.0 client/MidHandshake#Handshaking#(clientrust-analyzer cargo async-tls 0.13.0 client/::TlsStreamrust-analyzer cargo async-tls 0.13.0 client/TlsStream# { |
| 159 |
sessionrust-analyzer cargo async-tls 0.13.0 client/TlsStream#session., |
| 160 |
iorust-analyzer cargo async-tls 0.13.0 client/TlsStream#io.: stream, |
| 161 |
staterust-analyzer cargo async-tls 0.13.0 client/TlsStream#state.: TlsStaterust-analyzer cargo async-tls 0.13.0 common/tls_state/TlsState#::Streamrust-analyzer cargo async-tls 0.13.0 common/tls_state/TlsState#Stream#, |
| 162 |
early_datarust-analyzer cargo async-tls 0.13.0 client/TlsStream#early_data.: (0, Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().()), |
| 163 |
}) |
| 164 |
})) |
| 165 |
} |
| 166 |
} |
| 167 |
} |
| 168 |
|
| 169 |
/// Future returned from `TlsConnector::connect` which will resolve |
| 170 |
/// once the connection handshake has finished. |
| 171 |
pub struct Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#<IO>(ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#<IO>); |
| 172 |
|
| 173 |
enum ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#<IO> { |
| 174 |
Errorrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Error#(Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#>), |
| 175 |
Handshakerust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Handshake#(clientrust-analyzer cargo async-tls 0.13.0 client/::MidHandshakerust-analyzer cargo async-tls 0.13.0 client/MidHandshake#<IO>), |
| 176 |
} |
| 177 |
|
| 178 |
impl<IO: AsyncReadrust-analyzer cargo futures-io 0.3.34 if_std/AsyncRead# + AsyncWriterust-analyzer cargo futures-io 0.3.34 if_std/AsyncWrite# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#> Futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future# for Connectrust-analyzer cargo async-tls 0.13.0 connector/Connect#<IO> { |
| 179 |
type Outputrust-analyzer cargo async-tls 0.13.0 connector/impl#[`Connect<IO>`][Future]Output# = iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<clientrust-analyzer cargo async-tls 0.13.0 client/::TlsStreamrust-analyzer cargo async-tls 0.13.0 client/TlsStream#<IO>>; |
| 180 |
|
| 181 |
#[inline] |
| 182 |
fn pollrust-analyzer cargo async-tls 0.13.0 connector/impl#[`Connect<IO>`][Future]poll().(mut self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async-tls 0.13.0 connector/impl#[`Connect<IO>`][Future]>, cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#<'_>) -> Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#<Selfrust-analyzer cargo async-tls 0.13.0 connector/impl#[`Connect<IO>`][Future]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#Output#> { |
| 183 |
match self.0rust-analyzer cargo async-tls 0.13.0 connector/Connect#0. { |
| 184 |
ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#::Errorrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Error#(ref mut err) => { |
| 185 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Readyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Ready#(Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err.takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]take().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("Polled twice after being Ready"))) |
| 186 |
} |
| 187 |
ConnectInnerrust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#::Handshakerust-analyzer cargo async-tls 0.13.0 connector/ConnectInner#Handshake#(ref mut handshake) => Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<Ptr>`]new().(handshake).pollrust-analyzer cargo async-tls 0.13.0 client/impl#[`MidHandshake<IO>`][Future]poll().(cx), |
| 188 |
} |
| 189 |
} |
| 190 |
} |