| 1 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::VecDequerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/VecDeque#; |
| 2 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::{Derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#, DerefMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/DerefMut#}; |
| 3 | |
| 4 | use bytesrust-analyzer cargo bytes 1.12.1 crate/::{Bufrust-analyzer cargo bytes 1.12.1 buf/buf_impl/Buf#, Bytesrust-analyzer cargo bytes 1.12.1 bytes/Bytes#, BytesMutrust-analyzer cargo bytes 1.12.1 bytes_mut/BytesMut#}; |
| 5 | |
| 6 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::collationrust-analyzer cargo sqlx-mysql 0.8.3 collation/::{CharSetrust-analyzer cargo sqlx-mysql 0.8.3 collation/CharSet#, Collationrust-analyzer cargo sqlx-mysql 0.8.3 collation/Collation#}; |
| 7 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::errorrust-analyzer cargo sqlx-mysql 0.8.3 error/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 8 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::iorust-analyzer cargo sqlx-mysql 0.8.3 io/::MySqlBufExtrust-analyzer cargo sqlx-mysql 0.8.3 io/buf/MySqlBufExt#; |
| 9 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::iorust-analyzer cargo sqlx-mysql 0.8.3 io/::{ProtocolDecoderust-analyzer cargo sqlx-core 0.8.3 io/decode/ProtocolDecode#, ProtocolEncoderust-analyzer cargo sqlx-core 0.8.3 io/encode/ProtocolEncode#}; |
| 10 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::netrust-analyzer cargo sqlx-core 0.8.3 net/::{BufferedSocketrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/BufferedSocket#, Socketrust-analyzer cargo sqlx-core 0.8.3 net/socket/Socket#}; |
| 11 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::protocolrust-analyzer cargo sqlx-mysql 0.8.3 protocol/::responserust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/::{EofPacketrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/eof/EofPacket#, ErrPacketrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/err/ErrPacket#, OkPacketrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/ok/OkPacket#, Statusrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/status/Status#}; |
| 12 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::protocolrust-analyzer cargo sqlx-mysql 0.8.3 protocol/::{Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#, Packetrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/Packet#}; |
| 13 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::{MySqlConnectOptionsrust-analyzer cargo sqlx-mysql 0.8.3 options/MySqlConnectOptions#, MySqlDatabaseErrorrust-analyzer cargo sqlx-mysql 0.8.3 error/MySqlDatabaseError#}; |
| 14 | |
| 15 | pub struct MySqlStreamrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#<S = Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Socketrust-analyzer cargo sqlx-core 0.8.3 net/socket/Socket#>> { |
| 16 | // Wrapping the socket in `Box` allows us to unsize in-place. |
| 17 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket.: BufferedSocketrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/BufferedSocket#<S>, |
| 18 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) server_versionrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#server_version.: (u16, u16, u16), |
| 19 | pub(superrust-analyzer cargo sqlx-mysql 0.8.3 connection/) capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities.: Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#, |
| 20 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) sequence_idrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#sequence_id.: u8, |
| 21 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting.: VecDequerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/VecDeque#<Waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#>, |
| 22 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) charsetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#charset.: CharSetrust-analyzer cargo sqlx-mysql 0.8.3 collation/CharSet#, |
| 23 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) collationrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#collation.: Collationrust-analyzer cargo sqlx-mysql 0.8.3 collation/Collation#, |
| 24 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) is_tlsrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#is_tls.: bool, |
| 25 | } |
| 26 | |
| 27 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:)] |
| 28 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) enum Waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting# { |
| 29 | // waiting for a result set |
| 30 | Resultrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#Result#, |
| 31 | |
| 32 | // waiting for a row within a result set |
| 33 | Rowrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#Row#, |
| 34 | } |
| 35 | |
| 36 | impl<S: Socketrust-analyzer cargo sqlx-core 0.8.3 net/socket/Socket#> MySqlStreamrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#<S> { |
| 37 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) fn with_socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]with_socket().( |
| 38 | charset: CharSetrust-analyzer cargo sqlx-mysql 0.8.3 collation/CharSet#, |
| 39 | collation: Collationrust-analyzer cargo sqlx-mysql 0.8.3 collation/Collation#, |
| 40 | options: &MySqlConnectOptionsrust-analyzer cargo sqlx-mysql 0.8.3 options/MySqlConnectOptions#, |
| 41 | socket: S, |
| 42 | ) -> Selfrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`] { |
| 43 | let mut capabilities = Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::PROTOCOL_41rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]PROTOCOL_41. |
| 44 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::IGNORE_SPACErust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]IGNORE_SPACE. |
| 45 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::DEPRECATE_EOFrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]DEPRECATE_EOF. |
| 46 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::FOUND_ROWSrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]FOUND_ROWS. |
| 47 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::TRANSACTIONSrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]TRANSACTIONS. |
| 48 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::SECURE_CONNECTIONrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]SECURE_CONNECTION. |
| 49 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::PLUGIN_AUTH_LENENC_DATArust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]PLUGIN_AUTH_LENENC_DATA. |
| 50 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::MULTI_STATEMENTSrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]MULTI_STATEMENTS. |
| 51 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::MULTI_RESULTSrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]MULTI_RESULTS. |
| 52 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::PLUGIN_AUTHrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]PLUGIN_AUTH. |
| 53 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::PS_MULTI_RESULTSrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]PS_MULTI_RESULTS. |
| 54 | |rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOr<Self>`]bitor().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::SSLrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]SSL.; |
| 55 | |
| 56 | if options.databaserust-analyzer cargo sqlx-mysql 0.8.3 options/MySqlConnectOptions#database..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() { |
| 57 | capabilities rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities][`BitOrAssign<Self>`]bitor_assign().Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::CONNECT_WITH_DBrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]CONNECT_WITH_DB.; |
| 58 | } |
| 59 | |
| 60 | Selfrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`] { |
| 61 | waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting.: VecDequerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/VecDeque#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T>`]new().(), |
| 62 | capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities., |
| 63 | server_versionrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#server_version.: (0, 0, 0), |
| 64 | sequence_idrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#sequence_id.: 0, |
| 65 | collationrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#collation., |
| 66 | charsetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#charset., |
| 67 | socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket.: BufferedSocketrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/BufferedSocket#::newrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]new().(socket), |
| 68 | is_tlsrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#is_tls.: false, |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) async fn wait_until_readyrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]wait_until_ready().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> { |
| 73 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket..write_bufferrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]write_buffer().().is_emptyrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[WriteBuffer]is_empty().() { |
| 74 | self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket..flushrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]flush().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 75 | } |
| 76 | |
| 77 | while !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]is_empty().() { |
| 78 | while self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]front().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&Waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#::Rowrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#Row#) { |
| 79 | let packet = self.recv_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 80 | |
| 81 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().packet.is_emptyrust-analyzer cargo bytes 1.12.1 bytes/impl#[Bytes]is_empty().() && packet[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xfe && packet.lenrust-analyzer cargo bytes 1.12.1 bytes/impl#[Bytes]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().9 { |
| 82 | let eof = packet.eofrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/impl#[`Packet<Bytes>`]eof().(self.capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 83 | |
| 84 | if eof.statusrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/eof/EofPacket#status..containsrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/status/impl#[Status]contains().(Statusrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/status/Status#::SERVER_MORE_RESULTS_EXISTSrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/status/impl#[Status]SERVER_MORE_RESULTS_EXISTS.) { |
| 85 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..front_mutrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]front_mut().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() = Waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#::Resultrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#Result#; |
| 86 | } else { |
| 87 | self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..pop_frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]pop_front().(); |
| 88 | }; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | while self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]front().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&Waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#::Resultrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#Result#) { |
| 93 | let packet = self.recv_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 94 | |
| 95 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().packet.is_emptyrust-analyzer cargo bytes 1.12.1 bytes/impl#[Bytes]is_empty().() && (packet[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x00 || packet[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xff) { |
| 96 | let ok = packet.okrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/impl#[`Packet<Bytes>`]ok().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 97 | |
| 98 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ok.statusrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/ok/OkPacket#status..containsrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/status/impl#[Status]contains().(Statusrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/status/Status#::SERVER_MORE_RESULTS_EXISTSrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/status/impl#[Status]SERVER_MORE_RESULTS_EXISTS.) { |
| 99 | self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..pop_frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]pop_front().(); |
| 100 | } |
| 101 | } else { |
| 102 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..front_mutrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]front_mut().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() = Waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#::Rowrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/Waiting#Row#; |
| 103 | self.skip_result_metadatarust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]skip_result_metadata().(packet).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 104 | } |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 109 | } |
| 110 | |
| 111 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) async fn send_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]send_packet().<'en, T>(&mut self, payload: T) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> |
| 112 | where |
| 113 | T: ProtocolEncoderust-analyzer cargo sqlx-core 0.8.3 io/encode/ProtocolEncode#<'en, Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#>, |
| 114 | { |
| 115 | self.sequence_idrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#sequence_id. = 0; |
| 116 | self.write_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]write_packet().(payload)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 117 | self.flushrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]flush().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 118 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 119 | } |
| 120 | |
| 121 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) fn write_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]write_packet().<'en, T>(&mut self, payload: T) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> |
| 122 | where |
| 123 | T: ProtocolEncoderust-analyzer cargo sqlx-core 0.8.3 io/encode/ProtocolEncode#<'en, Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#>, |
| 124 | { |
| 125 | self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket. |
| 126 | .write_withrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]write_with().(Packetrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/Packet#(payload), (self.capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities., &mut self.sequence_idrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#sequence_id.)) |
| 127 | } |
| 128 | |
| 129 | async fn recv_packet_partrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet_part().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Bytesrust-analyzer cargo bytes 1.12.1 bytes/Bytes#, Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> { |
| 130 | // https://dev.mysql.com/doc/dev/mysql-server/8.0.12/page_protocol_basic_packets.html |
| 131 | // https://mariadb.com/kb/en/library/0-packet/#standard-packet |
| 132 | |
| 133 | let mut header: Bytesrust-analyzer cargo bytes 1.12.1 bytes/Bytes# = self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket..readrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]read().(4).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 134 | |
| 135 | // cannot overflow |
| 136 | #[allow(clippy::cast_possible_truncation)] |
| 137 | let packet_size = header.get_uint_lerust-analyzer cargo bytes 1.12.1 buf/buf_impl/Buf#get_uint_le().(3) as usize; |
| 138 | let sequence_id = header.get_u8rust-analyzer cargo bytes 1.12.1 buf/buf_impl/Buf#get_u8().(); |
| 139 | |
| 140 | self.sequence_idrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#sequence_id. = sequence_id.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u8]wrapping_add().(1); |
| 141 | |
| 142 | let payload: Bytesrust-analyzer cargo bytes 1.12.1 bytes/Bytes# = self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket..readrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]read().(packet_size).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 143 | |
| 144 | // TODO: packet compression |
| 145 | |
| 146 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(payload) |
| 147 | } |
| 148 | |
| 149 | // receive the next packet from the database server |
| 150 | // may block (async) on more data from the server |
| 151 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) async fn recv_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Packetrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/Packet#<Bytesrust-analyzer cargo bytes 1.12.1 bytes/Bytes#>, Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> { |
| 152 | let payload = self.recv_packet_partrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet_part().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 153 | let payload = if payload.lenrust-analyzer cargo bytes 1.12.1 bytes/impl#[Bytes]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().0xFF_FF_FF { |
| 154 | payload |
| 155 | } else { |
| 156 | let mut final_payload = BytesMutrust-analyzer cargo bytes 1.12.1 bytes_mut/BytesMut#::with_capacityrust-analyzer cargo bytes 1.12.1 bytes_mut/impl#[BytesMut]with_capacity().(0xFF_FF_FF rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2); |
| 157 | final_payload.extend_from_slicerust-analyzer cargo bytes 1.12.1 bytes_mut/impl#[BytesMut]extend_from_slice().(&payload); |
| 158 | |
| 159 | droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/drop().(payload); // we don't need the allocation anymore |
| 160 | |
| 161 | let mut last_read = 0xFF_FF_FF; |
| 162 | while last_read 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().0xFF_FF_FF { |
| 163 | let part = self.recv_packet_partrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet_part().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 164 | last_read = part.lenrust-analyzer cargo bytes 1.12.1 bytes/impl#[Bytes]len().(); |
| 165 | final_payload.extend_from_slicerust-analyzer cargo bytes 1.12.1 bytes_mut/impl#[BytesMut]extend_from_slice().(&part); |
| 166 | } |
| 167 | final_payload.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 168 | }; |
| 169 | |
| 170 | if payload |
| 171 | .firstrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]first().() |
| 172 | .ok_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or().(err_protocolrust-analyzer cargo sqlx-core 0.8.3 error/err_protocol!!("Packet empty"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). |
| 173 | .eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().(&0xff) |
| 174 | { |
| 175 | self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting..pop_frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]pop_front().(); |
| 176 | |
| 177 | // instead of letting this packet be looked at everywhere, we check here |
| 178 | // and emit a proper Error |
| 179 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#( |
| 180 | MySqlDatabaseErrorrust-analyzer cargo sqlx-mysql 0.8.3 error/MySqlDatabaseError#(ErrPacketrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/err/ErrPacket#::decode_withrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/err/impl#[ErrPacket][`ProtocolDecode<'_, Capabilities>`]decode_with().(payload, self.capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), |
| 181 | ); |
| 182 | } |
| 183 | |
| 184 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Packetrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/Packet#(payload)) |
| 185 | } |
| 186 | |
| 187 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) async fn recvrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv().<'de, T>(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<T, Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> |
| 188 | where |
| 189 | T: ProtocolDecoderust-analyzer cargo sqlx-core 0.8.3 io/decode/ProtocolDecode#<'de, Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#>, |
| 190 | { |
| 191 | self.recv_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..decode_withrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/impl#[`Packet<Bytes>`]decode_with().(self.capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities.) |
| 192 | } |
| 193 | |
| 194 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) async fn recv_okrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_ok().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<OkPacketrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/ok/OkPacket#, Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> { |
| 195 | self.recv_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..okrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/impl#[`Packet<Bytes>`]ok().() |
| 196 | } |
| 197 | |
| 198 | pub(craterust-analyzer cargo sqlx-mysql 0.8.3 crate/) async fn maybe_recv_eofrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]maybe_recv_eof().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<EofPacketrust-analyzer cargo sqlx-mysql 0.8.3 protocol/response/eof/EofPacket#>, Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> { |
| 199 | if self.capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities..containsrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]contains().(Capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/Capabilities#::DEPRECATE_EOFrust-analyzer cargo sqlx-mysql 0.8.3 protocol/capabilities/impl#[Capabilities]DEPRECATE_EOF.) { |
| 200 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#) |
| 201 | } else { |
| 202 | self.recvrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll()..maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#) |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | async fn skip_result_metadatarust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]skip_result_metadata().(&mut self, mut packet: Packetrust-analyzer cargo sqlx-mysql 0.8.3 protocol/packet/Packet#<Bytesrust-analyzer cargo bytes 1.12.1 bytes/Bytes#>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#> { |
| 207 | let num_columns: u64 = packet.get_uint_lenencrust-analyzer cargo sqlx-mysql 0.8.3 io/buf/impl#[Bytes][MySqlBufExt]get_uint_lenenc().(); // column count |
| 208 | |
| 209 | for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#num_columns { |
| 210 | let _ = self.recv_packetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]recv_packet().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 211 | } |
| 212 | |
| 213 | self.maybe_recv_eofrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]maybe_recv_eof().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 214 | |
| 215 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 216 | } |
| 217 | |
| 218 | pub fn boxed_socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`]boxed_socket().(self) -> MySqlStreamrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream# { |
| 219 | MySqlStreamrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream# { |
| 220 | socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket.: self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket..boxedrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/impl#[`BufferedSocket<S>`]boxed().(), |
| 221 | server_versionrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#server_version.: self.server_versionrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#server_version., |
| 222 | capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities.: self.capabilitiesrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#capabilities., |
| 223 | sequence_idrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#sequence_id.: self.sequence_idrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#sequence_id., |
| 224 | waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting.: self.waitingrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#waiting., |
| 225 | charsetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#charset.: self.charsetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#charset., |
| 226 | collationrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#collation.: self.collationrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#collation., |
| 227 | is_tlsrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#is_tls.: self.is_tlsrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#is_tls., |
| 228 | } |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | impl<S> Derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref# for MySqlStreamrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#<S> { |
| 233 | type Targetrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`][Deref]Target# = BufferedSocketrust-analyzer cargo sqlx-core 0.8.3 net/socket/buffered/BufferedSocket#<S>; |
| 234 | |
| 235 | fn derefrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`][Deref]deref().(&self) -> &Selfrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`][Deref]::Targetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#Target# { |
| 236 | &self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket. |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | impl<S> DerefMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/DerefMut# for MySqlStreamrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#<S> { |
| 241 | fn deref_mutrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`][DerefMut]deref_mut().(&mut self) -> &mut Selfrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/impl#[`MySqlStream<S>`][DerefMut]::Targetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#Target# { |
| 242 | &mut self.socketrust-analyzer cargo sqlx-mysql 0.8.3 connection/stream/MySqlStream#socket. |
| 243 | } |
| 244 | } |