| 1 |
use futures_corerust-analyzer cargo futures-core 0.3.34 crate/::readyrust-analyzer cargo futures-core 0.3.34 task/poll/ready!; |
| 2 |
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#}; |
| 3 |
#[cfg(feature = "early-data")] |
| 4 |
use rustlsrust-analyzer cargo rustls 0.23.43 crate/::clientrust-analyzer cargo rustls 0.23.43 client/::WriteEarlyDatarust-analyzer cargo rustls 0.23.43 client/client_conn/connection/WriteEarlyData#; |
| 5 |
use rustlsrust-analyzer cargo rustls 0.23.43 crate/::{ClientConnectionrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/ClientConnection#, IoStaterust-analyzer cargo rustls 0.23.43 common_state/IoState#, Readerrust-analyzer cargo rustls 0.23.43 conn/connection/Reader#, ServerConnectionrust-analyzer cargo rustls 0.23.43 server/server_conn/connection/ServerConnection#, Writerrust-analyzer cargo rustls 0.23.43 conn/connection/Writer#}; |
| 6 |
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/::{selfrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/, Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#, Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#}; |
| 7 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::markerrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/::Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#; |
| 8 |
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#; |
| 9 |
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#}; |
| 10 |
|
| 11 |
pub struct Streamrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#<'a, IO> { |
| 12 |
pub iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#io.: &'a mut IO, |
| 13 |
pub connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn.: Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#<'a>, |
| 14 |
pub eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof.: bool, |
| 15 |
} |
| 16 |
|
| •17 |
pub enum Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#<'a> { |
| 18 |
Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(&'a mut ClientConnectionrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/ClientConnection#), |
| 19 |
Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(&'a mut ServerConnectionrust-analyzer cargo rustls 0.23.43 server/server_conn/connection/ServerConnection#), |
| 20 |
} |
| 21 |
|
| 22 |
impl Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#<'_> { |
| 23 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn is_handshakingrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]is_handshaking().(&self) -> bool { |
| 24 |
match self { |
| 25 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.is_handshakingrust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]is_handshaking().(), |
| 26 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.is_handshakingrust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]is_handshaking().(), |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn wants_writerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_write().(&self) -> bool { |
| 31 |
match self { |
| 32 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.wants_writerust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]wants_write().(), |
| 33 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.wants_writerust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]wants_write().(), |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn wants_readrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_read().(&self) -> bool { |
| 38 |
match self { |
| 39 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.wants_readrust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]wants_read().(), |
| 40 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.wants_readrust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]wants_read().(), |
| 41 |
} |
| 42 |
} |
| 43 |
|
| 44 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn write_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]write_tls().(&mut self, wr: &mut dyn iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<usize, 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#> { |
| 45 |
match self { |
| 46 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.write_tlsrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]write_tls().(wr), |
| 47 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.write_tlsrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]write_tls().(wr), |
| 48 |
} |
| 49 |
} |
| 50 |
|
| 51 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn readerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]reader().(&mut self) -> Readerrust-analyzer cargo rustls 0.23.43 conn/connection/Reader# { |
| 52 |
match self { |
| 53 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.readerrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]reader().(), |
| 54 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.readerrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]reader().(), |
| 55 |
} |
| 56 |
} |
| 57 |
|
| 58 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn writerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]writer().(&mut self) -> Writerrust-analyzer cargo rustls 0.23.43 conn/connection/Writer# { |
| 59 |
match self { |
| 60 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.writerrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]writer().(), |
| 61 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.writerrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]writer().(), |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn send_close_notifyrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]send_close_notify().(&mut self) { |
| 66 |
match self { |
| 67 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.send_close_notifyrust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]send_close_notify().(), |
| 68 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.send_close_notifyrust-analyzer cargo rustls 0.23.43 common_state/impl#[CommonState]send_close_notify().(), |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn read_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]read_tls().(&mut self, rd: &mut dyn iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<usize, 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#> { |
| 73 |
match self { |
| 74 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.read_tlsrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]read_tls().(rd), |
| 75 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.read_tlsrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]read_tls().(rd), |
| 76 |
} |
| 77 |
} |
| 78 |
|
| 79 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn process_new_packetsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]process_new_packets().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IoStaterust-analyzer cargo rustls 0.23.43 common_state/IoState#, rustlsrust-analyzer cargo rustls 0.23.43 crate/::Errorrust-analyzer cargo rustls 0.23.43 error/Error#> { |
| 80 |
match self { |
| 81 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.process_new_packetsrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]process_new_packets().(), |
| 82 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(c) => c.process_new_packetsrust-analyzer cargo rustls 0.23.43 conn/impl#[`ConnectionCommon<Data>`]process_new_packets().(), |
| 83 |
} |
| 84 |
} |
| 85 |
|
| 86 |
#[cfg(feature = "early-data")] |
| 87 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn is_early_data_acceptedrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]is_early_data_accepted().(&self) -> bool { |
| 88 |
match self { |
| 89 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.is_early_data_acceptedrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/impl#[ClientConnection]is_early_data_accepted().(), |
| 90 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(_) => false, |
| 91 |
} |
| 92 |
} |
| 93 |
|
| 94 |
#[cfg(feature = "early-data")] |
| 95 |
pub(craterust-analyzer cargo async-tls 0.13.0 crate/) fn client_early_datarust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]client_early_data().(&mut self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<WriteEarlyDatarust-analyzer cargo rustls 0.23.43 client/client_conn/connection/WriteEarlyData#<'_>> { |
| 96 |
match self { |
| 97 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(c) => c.early_datarust-analyzer cargo rustls 0.23.43 client/client_conn/connection/impl#[ClientConnection]early_data().(), |
| 98 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(_) => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 99 |
} |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
impl<'a> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<&'a mut ClientConnectionrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/ClientConnection#> for Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#<'a> { |
| 104 |
fn fromrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'a>`][`From<&'a mut ClientConnection>`]from().(conn: &'a mut ClientConnectionrust-analyzer cargo rustls 0.23.43 client/client_conn/connection/ClientConnection#) -> Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'a>`][`From<&'a mut ClientConnection>`] { |
| 105 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Clientrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Client#(conn) |
| 106 |
} |
| 107 |
} |
| 108 |
|
| 109 |
impl<'a> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<&'a mut ServerConnectionrust-analyzer cargo rustls 0.23.43 server/server_conn/connection/ServerConnection#> for Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#<'a> { |
| 110 |
fn fromrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'a>`][`From<&'a mut ServerConnection>`]from().(conn: &'a mut ServerConnectionrust-analyzer cargo rustls 0.23.43 server/server_conn/connection/ServerConnection#) -> Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'a>`][`From<&'a mut ServerConnection>`] { |
| 111 |
Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#::Serverrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#Server#(conn) |
| 112 |
} |
| 113 |
} |
| 114 |
|
| 115 |
trait WriteTlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/WriteTls#<IO: AsyncWriterust-analyzer cargo futures-io 0.3.34 if_std/AsyncWrite#> { |
| 116 |
fn write_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/WriteTls#write_tls().(&mut self, cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#) -> 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#<usize>; |
| 117 |
} |
| 118 |
|
| 119 |
#[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:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:)] |
| 120 |
enum Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus# { |
| 121 |
Emptyrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Empty#, |
| 122 |
Readablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Readable#, |
| 123 |
Writablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Writable#, |
| 124 |
} |
| 125 |
|
| 126 |
impl<'a, 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#> Streamrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#<'a, IO> { |
| 127 |
pub fn newrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]new().(io: &'a mut IO, conn: impl Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Conn#<'a>>) -> Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`] { |
| 128 |
Streamrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream# { |
| 129 |
iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#io., |
| 130 |
connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn.: conn.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(), |
| 131 |
// The state so far is only used to detect EOF, so either Stream |
| 132 |
// or EarlyData state should both be all right. |
| 133 |
eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof.: false, |
| 134 |
} |
| 135 |
} |
| 136 |
|
| 137 |
pub fn set_eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]set_eof().(mut self, eof: bool) -> Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`] { |
| 138 |
self.eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof. = eof; |
| 139 |
self |
| 140 |
} |
| 141 |
|
| 142 |
pub fn as_mut_pinrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]as_mut_pin().(&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 rusttls/stream/impl#[`Stream<'a, IO>`]> { |
| 143 |
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().(self) |
| 144 |
} |
| 145 |
|
| 146 |
pub fn complete_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_io().(&mut self, 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#<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#<(usize, usize)>> { |
| 147 |
self.complete_inner_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_inner_io().(cx, Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Emptyrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Empty#) |
| 148 |
} |
| 149 |
|
| 150 |
fn complete_read_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_read_io().(&mut self, 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#<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#<usize>> { |
| 151 |
struct Readerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#<'a, 'b, T> { |
| 152 |
iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#io.: &'a mut T, |
| 153 |
cxrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#cx.: &'a mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#<'b>, |
| 154 |
} |
| 155 |
|
| 156 |
impl<'a, 'b, T: AsyncReadrust-analyzer cargo futures-io 0.3.34 if_std/AsyncRead# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#> Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read# for Readerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#<'a, 'b, T> { |
| 157 |
fn readrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Reader<'a, 'b, T>`][Read]read().(&mut self, buf: &mut [u8]) -> 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#<usize> { |
| 158 |
match 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().(&mut self.iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#io.).poll_readrust-analyzer cargo futures-io 0.3.34 if_std/impl#[`&mut T`][AsyncRead]poll_read().(self.cxrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#cx., buf) { |
| 159 |
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#(result) => result, |
| 160 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock#.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()), |
| 161 |
} |
| 162 |
} |
| 163 |
} |
| 164 |
|
| 165 |
let mut reader = Readerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader# { iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#io.: self.iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#io., cxrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Reader#cx. }; |
| 166 |
|
| 167 |
let n = match self.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..read_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]read_tls().(&mut reader) { |
| 168 |
Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(n) => n, |
| 169 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ref err) if err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().() rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().==rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq(). rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock# => return Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 170 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) => return 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)), |
| 171 |
}; |
| 172 |
|
| 173 |
self.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..process_new_packetsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]process_new_packets().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|err| { |
| 174 |
// In case we have an alert to send describing this error, |
| 175 |
// try a last-gasp write -- but don't predate the primary |
| 176 |
// error. |
| 177 |
let _ = self.write_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][`WriteTls<IO>`]write_tls().(cx); |
| 178 |
|
| 179 |
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().(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#::InvalidDatarust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidData#, err) |
| 180 |
})?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 181 |
|
| 182 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(n)) |
| 183 |
} |
| 184 |
|
| 185 |
fn complete_write_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_write_io().(&mut self, 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#<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#<usize>> { |
| 186 |
match self.write_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][`WriteTls<IO>`]write_tls().(cx) { |
| 187 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ref err) if err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().() rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().==rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq(). rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock# => Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 188 |
result => 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#(result), |
| 189 |
} |
| 190 |
} |
| 191 |
|
| 192 |
fn complete_inner_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_inner_io().( |
| 193 |
&mut self, |
| 194 |
cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#, |
| 195 |
focus: Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#, |
| 196 |
) -> Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#<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#<(usize, usize)>> { |
| 197 |
let mut wrlen = 0; |
| 198 |
let mut rdlen = 0; |
| 199 |
|
| 200 |
loop { |
| 201 |
let mut write_would_block = false; |
| 202 |
let mut read_would_block = false; |
| 203 |
|
| 204 |
while self.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..wants_writerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_write().() { |
| 205 |
match self.complete_write_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_write_io().(cx) { |
| 206 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(n)) => wrlen rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().n, |
| 207 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# => { |
| 208 |
write_would_block = true; |
| 209 |
break; |
| 210 |
} |
| 211 |
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)) => return 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)), |
| 212 |
} |
| 213 |
} |
| 214 |
|
| 215 |
if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof. && self.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..wants_readrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_read().() { |
| 216 |
match self.complete_read_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_read_io().(cx) { |
| 217 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(0)) => self.eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof. = true, |
| 218 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(n)) => rdlen rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().n, |
| 219 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# => read_would_block = true, |
| 220 |
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)) => return 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)), |
| 221 |
} |
| 222 |
} |
| 223 |
|
| 224 |
let would_block = match focus { |
| 225 |
Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Emptyrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Empty# => write_would_block || read_would_block, |
| 226 |
Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Readablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Readable# => read_would_block, |
| 227 |
Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Writablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Writable# => write_would_block, |
| 228 |
}; |
| 229 |
|
| 230 |
match (self.eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof., self.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..is_handshakingrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]is_handshaking().(), would_block) { |
| 231 |
(true, true, _) => { |
| 232 |
let err = 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().(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#::UnexpectedEofrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#UnexpectedEof#, "tls handshake eof"); |
| 233 |
return 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)); |
| 234 |
} |
| 235 |
(_, false, true) => { |
| 236 |
let would_block = match focus { |
| 237 |
Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Emptyrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Empty# => rdlen rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0 && wrlen rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0, |
| 238 |
Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Readablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Readable# => rdlen rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0, |
| 239 |
Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Writablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Writable# => wrlen rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0, |
| 240 |
}; |
| 241 |
|
| 242 |
return if would_block { |
| 243 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# |
| 244 |
} else { |
| 245 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((rdlen, wrlen))) |
| 246 |
}; |
| 247 |
} |
| 248 |
(_, false, _) => return 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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((rdlen, wrlen))), |
| 249 |
(_, true, true) => return Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 250 |
(..) => (), |
| 251 |
} |
| 252 |
} |
| 253 |
} |
| 254 |
} |
| 255 |
|
| 256 |
impl<'a, 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#> WriteTlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/WriteTls#<IO> for Streamrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#<'a, IO> { |
| 257 |
fn write_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][`WriteTls<IO>`]write_tls().(&mut self, cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#) -> 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#<usize> { |
| 258 |
// TODO writev |
| 259 |
|
| 260 |
struct Writerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#<'a, 'b, T> { |
| 261 |
iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#io.: &'a mut T, |
| 262 |
cxrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#cx.: &'a mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#<'b>, |
| 263 |
} |
| 264 |
|
| 265 |
impl<'a, 'b, T: 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#> Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write# for Writerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#<'a, 'b, T> { |
| 266 |
fn writerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Writer<'a, 'b, T>`][Write]write().(&mut self, buf: &[u8]) -> 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#<usize> { |
| 267 |
match 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().(&mut self.iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#io.).poll_writerust-analyzer cargo futures-io 0.3.34 if_std/impl#[`&mut T`][AsyncWrite]poll_write().(self.cxrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#cx., buf) { |
| 268 |
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#(result) => result, |
| 269 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock#.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()), |
| 270 |
} |
| 271 |
} |
| 272 |
|
| 273 |
fn flushrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Writer<'a, 'b, T>`][Write]flush().(&mut self) -> 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#<()> { |
| 274 |
match 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().(&mut self.iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#io.).poll_flushrust-analyzer cargo futures-io 0.3.34 if_std/impl#[`&mut T`][AsyncWrite]poll_flush().(self.cxrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#cx.) { |
| 275 |
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#(result) => result, |
| 276 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock#.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()), |
| 277 |
} |
| 278 |
} |
| 279 |
} |
| 280 |
|
| 281 |
let mut writer = Writerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer# { iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#io.: self.iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#io., cxrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Writer#cx. }; |
| 282 |
self.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..write_tlsrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]write_tls().(&mut writer) |
| 283 |
} |
| 284 |
} |
| 285 |
|
| 286 |
impl<'a, 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#> AsyncReadrust-analyzer cargo futures-io 0.3.34 if_std/AsyncRead# for Streamrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#<'a, IO> { |
| 287 |
fn poll_readrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncRead]poll_read().( |
| 288 |
self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncRead]>, |
| 289 |
cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#, |
| 290 |
buf: &mut [u8], |
| 291 |
) -> Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#<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#<usize>> { |
| 292 |
let this = self.get_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<&'a mut T>`]get_mut().(); |
| 293 |
|
| 294 |
while !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().this.eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof. && this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..wants_readrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_read().() { |
| 295 |
match this.complete_inner_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_inner_io().(cx, Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Readablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Readable#) { |
| 296 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((0, _))) => break, |
| 297 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(_)) => (), |
| 298 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# => return Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 299 |
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)) => return 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)), |
| 300 |
} |
| 301 |
} |
| 302 |
|
| 303 |
let mut reader = this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..readerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]reader().(); |
| 304 |
match reader.readrust-analyzer cargo rustls 0.23.43 conn/connection/impl#[`Reader<'_>`][Read]read().(buf) { |
| 305 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ref err) if err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().() rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().==rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq(). rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock# => Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 306 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) if err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().() rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().==rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq(). rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().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#::UnexpectedEofrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#UnexpectedEof# => { |
| 307 |
this.eofrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#eof. = true; |
| 308 |
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)) |
| 309 |
} |
| 310 |
result => 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#(result), |
| 311 |
} |
| 312 |
} |
| 313 |
} |
| 314 |
|
| 315 |
impl<'a, 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#> AsyncWriterust-analyzer cargo futures-io 0.3.34 if_std/AsyncWrite# for Streamrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#<'a, IO> { |
| 316 |
fn poll_writerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncWrite]poll_write().(self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncWrite]>, cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#, buf: &[u8]) -> Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#<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#<usize>> { |
| 317 |
let this = self.get_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<&'a mut T>`]get_mut().(); |
| 318 |
|
| 319 |
let len = match this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..writerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]writer().().writerust-analyzer cargo rustls 0.23.43 conn/connection/impl#[`Writer<'_>`][Write]write().(buf) { |
| 320 |
Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(n) => n, |
| 321 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ref err) if err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().() rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().==rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq(). rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock# => return Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 322 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) => return 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)), |
| 323 |
}; |
| 324 |
while this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..wants_writerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_write().() { |
| 325 |
match this.complete_inner_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_inner_io().(cx, Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Writablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Writable#) { |
| 326 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(_)) => (), |
| 327 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().0 => break, |
| 328 |
Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending# => return Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 329 |
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)) => return 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)), |
| 330 |
} |
| 331 |
} |
| 332 |
|
| 333 |
if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().0 || buf.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() { |
| 334 |
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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(len)) |
| 335 |
} else { |
| 336 |
// not write zero |
| 337 |
match this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..writerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]writer().().writerust-analyzer cargo rustls 0.23.43 conn/connection/impl#[`Writer<'_>`][Write]write().(buf) { |
| 338 |
Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(0) => Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 339 |
Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(n) => 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#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(n)), |
| 340 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ref err) if err.kindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]kind().() rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().==rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq(). rust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[ErrorKind][`PartialEq<Self>`]eq().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#::WouldBlockrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#WouldBlock# => Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Pendingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Pending#, |
| 341 |
Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) => 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)), |
| 342 |
} |
| 343 |
} |
| 344 |
} |
| 345 |
|
| 346 |
fn poll_flushrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncWrite]poll_flush().(self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncWrite]>, 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#<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#<()>> { |
| 347 |
let this = self.get_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<&'a mut T>`]get_mut().(); |
| 348 |
|
| 349 |
this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..writerrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]writer().().flushrust-analyzer cargo rustls 0.23.43 conn/connection/impl#[`Writer<'_>`][Write]flush().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 350 |
while this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..wants_writerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_write().() { |
| 351 |
readyrust-analyzer cargo futures-core 0.3.34 task/poll/ready!!(this.complete_inner_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_inner_io().(cx, Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Writablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Writable#))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 352 |
} |
| 353 |
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().(&mut this.iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#io.).poll_flushrust-analyzer cargo futures-io 0.3.34 if_std/impl#[`&mut T`][AsyncWrite]poll_flush().(cx) |
| 354 |
} |
| 355 |
|
| 356 |
fn poll_closerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncWrite]poll_close().(self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`][AsyncWrite]>, 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#<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#<()>> { |
| 357 |
let this = self.get_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<&'a mut T>`]get_mut().(); |
| 358 |
|
| 359 |
while this.connrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#conn..wants_writerust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Conn<'_>`]wants_write().() { |
| 360 |
readyrust-analyzer cargo futures-core 0.3.34 task/poll/ready!!(this.complete_inner_iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/impl#[`Stream<'a, IO>`]complete_inner_io().(cx, Focusrust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#::Writablerust-analyzer cargo async-tls 0.13.0 rusttls/stream/Focus#Writable#))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 361 |
} |
| 362 |
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().(&mut this.iorust-analyzer cargo async-tls 0.13.0 rusttls/stream/Stream#io.).poll_closerust-analyzer cargo futures-io 0.3.34 if_std/impl#[`&mut T`][AsyncWrite]poll_close().(cx) |
| 363 |
} |
| 364 |
} |
| 365 |
|
| 366 |
#[cfg(all(test, feature = "client"))] |
| 367 |
#[path = "test_stream.rs"] |
| 368 |
mod test_streamrust-analyzer cargo async-tls 0.13.0 rusttls/stream/test_stream/; |