| 1 | #![allow(missing_docs)] |
| 2 | |
| 3 | use byteorderrust-analyzer cargo byteorder 1.5.0 crate/::{BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#, ByteOrderrust-analyzer cargo byteorder 1.5.0 ByteOrder#, ReadBytesExtrust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#}; |
| 4 | use bytesrust-analyzer cargo bytes 1.11.1 crate/::{Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, BytesMutrust-analyzer cargo bytes 1.11.1 bytes_mut/BytesMut#}; |
| 5 | use fallible_iteratorrust-analyzer cargo fallible-iterator 0.3.0 crate/::FallibleIteratorrust-analyzer cargo fallible-iterator 0.3.0 FallibleIterator#; |
| 6 | use memchrrust-analyzer cargo memchr 2.8.1 crate/::memchrrust-analyzer cargo memchr 2.8.1 memchr/; |
| 7 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/; |
| 8 | 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#}; |
| 9 | 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/::Rangerust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#; |
| 10 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/; |
| 11 | |
| 12 | use craterust-analyzer cargo postgres-protocol 0.6.12 crate/::Oidrust-analyzer cargo postgres-protocol 0.6.12 Oid#; |
| 13 | |
| 14 | pub const PARSE_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PARSE_COMPLETE_TAG.: u8 = b'1'; |
| 15 | pub const BIND_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BIND_COMPLETE_TAG.: u8 = b'2'; |
| 16 | pub const CLOSE_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CLOSE_COMPLETE_TAG.: u8 = b'3'; |
| 17 | pub const NOTIFICATION_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NOTIFICATION_RESPONSE_TAG.: u8 = b'A'; |
| 18 | pub const COPY_DONE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_DONE_TAG.: u8 = b'c'; |
| 19 | pub const COMMAND_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COMMAND_COMPLETE_TAG.: u8 = b'C'; |
| 20 | pub const COPY_DATA_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_DATA_TAG.: u8 = b'd'; |
| 21 | pub const DATA_ROW_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DATA_ROW_TAG.: u8 = b'D'; |
| 22 | pub const ERROR_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ERROR_RESPONSE_TAG.: u8 = b'E'; |
| 23 | pub const COPY_IN_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_IN_RESPONSE_TAG.: u8 = b'G'; |
| 24 | pub const COPY_OUT_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_OUT_RESPONSE_TAG.: u8 = b'H'; |
| 25 | pub const EMPTY_QUERY_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/EMPTY_QUERY_RESPONSE_TAG.: u8 = b'I'; |
| 26 | pub const BACKEND_KEY_DATA_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BACKEND_KEY_DATA_TAG.: u8 = b'K'; |
| 27 | pub const NO_DATA_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NO_DATA_TAG.: u8 = b'n'; |
| 28 | pub const NOTICE_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NOTICE_RESPONSE_TAG.: u8 = b'N'; |
| 29 | pub const AUTHENTICATION_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AUTHENTICATION_TAG.: u8 = b'R'; |
| 30 | pub const PORTAL_SUSPENDED_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PORTAL_SUSPENDED_TAG.: u8 = b's'; |
| 31 | pub const PARAMETER_STATUS_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PARAMETER_STATUS_TAG.: u8 = b'S'; |
| 32 | pub const PARAMETER_DESCRIPTION_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PARAMETER_DESCRIPTION_TAG.: u8 = b't'; |
| 33 | pub const ROW_DESCRIPTION_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ROW_DESCRIPTION_TAG.: u8 = b'T'; |
| 34 | pub const READY_FOR_QUERY_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/READY_FOR_QUERY_TAG.: u8 = b'Z'; |
| 35 | |
| 36 | #[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:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 37 | pub struct Headerrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header# { |
| 38 | tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header#tag.: u8, |
| 39 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header#len.: i32, |
| 40 | } |
| 41 | |
| 42 | #[allow(clippy::len_without_is_empty)] |
| 43 | impl Headerrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header# { |
| 44 | #[inline] |
| 45 | pub fn parserust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Header]parse().(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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Headerrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header#>> { |
| 46 | if buf.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]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().5 { |
| 47 | return 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#); |
| 48 | } |
| 49 | |
| 50 | let tag = buf[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().; |
| 51 | let len = BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#::read_i32rust-analyzer cargo byteorder 1.5.0 ByteOrder#read_i32().(&buf[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().); |
| 52 | |
| 53 | if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().4 { |
| 54 | return 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/::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().( |
| 55 | 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#, |
| 56 | "invalid message length: header length < 4", |
| 57 | )); |
| 58 | } |
| 59 | |
| 60 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Headerrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header# { tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header#tag., lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header#len. })) |
| 61 | } |
| 62 | |
| 63 | #[inline] |
| 64 | pub fn tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Header]tag().(self) -> u8 { |
| 65 | self.tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header#tag. |
| 66 | } |
| 67 | |
| 68 | #[inline] |
| 69 | pub fn lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Header]len().(self) -> i32 { |
| 70 | self.lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Header#len. |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | /// An enum representing Postgres backend messages. |
| 75 | #[non_exhaustive] |
| 76 | pub enum Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message# { |
| 77 | AuthenticationCleartextPasswordrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationCleartextPassword#, |
| 78 | AuthenticationGssrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationGss#, |
| 79 | AuthenticationKerberosV5rust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationKerberosV5#, |
| 80 | AuthenticationMd5Passwordrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationMd5Password#(AuthenticationMd5PasswordBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationMd5PasswordBody#), |
| 81 | AuthenticationOkrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationOk#, |
| 82 | AuthenticationScmCredentialrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationScmCredential#, |
| 83 | AuthenticationSspirust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSspi#, |
| 84 | AuthenticationGssContinuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationGssContinue#(AuthenticationGssContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationGssContinueBody#), |
| 85 | AuthenticationSaslrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSasl#(AuthenticationSaslBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslBody#), |
| 86 | AuthenticationSaslContinuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSaslContinue#(AuthenticationSaslContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslContinueBody#), |
| 87 | AuthenticationSaslFinalrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSaslFinal#(AuthenticationSaslFinalBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslFinalBody#), |
| 88 | BackendKeyDatarust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#BackendKeyData#(BackendKeyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody#), |
| 89 | BindCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#BindComplete#, |
| 90 | CloseCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CloseComplete#, |
| 91 | CommandCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CommandComplete#(CommandCompleteBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CommandCompleteBody#), |
| 92 | CopyDatarust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyData#(CopyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody#), |
| 93 | CopyDonerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyDone#, |
| 94 | CopyInResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyInResponse#(CopyInResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#), |
| 95 | CopyOutResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyOutResponse#(CopyOutResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#), |
| 96 | DataRowrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#DataRow#(DataRowBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#), |
| 97 | EmptyQueryResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#EmptyQueryResponse#, |
| 98 | ErrorResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ErrorResponse#(ErrorResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorResponseBody#), |
| 99 | NoDatarust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#NoData#, |
| 100 | NoticeResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#NoticeResponse#(NoticeResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NoticeResponseBody#), |
| 101 | NotificationResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#NotificationResponse#(NotificationResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#), |
| 102 | ParameterDescriptionrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ParameterDescription#(ParameterDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody#), |
| 103 | ParameterStatusrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ParameterStatus#(ParameterStatusBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody#), |
| 104 | ParseCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ParseComplete#, |
| 105 | PortalSuspendedrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#PortalSuspended#, |
| 106 | ReadyForQueryrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ReadyForQuery#(ReadyForQueryBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ReadyForQueryBody#), |
| 107 | RowDescriptionrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#RowDescription#(RowDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody#), |
| 108 | } |
| 109 | |
| 110 | impl Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message# { |
| 111 | #[inline] |
| 112 | pub fn parserust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Message]parse().(buf: &mut BytesMutrust-analyzer cargo bytes 1.11.1 bytes_mut/BytesMut#) -> 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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#>> { |
| 113 | if buf.lenrust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]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().5 { |
| 114 | let to_read = 5 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().buf.lenrust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]len().(); |
| 115 | buf.reserverust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]reserve().(to_read); |
| 116 | return 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#); |
| 117 | } |
| 118 | |
| 119 | let tag = buf[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().; |
| 120 | let len = (&buf[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).read_u32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 121 | |
| 122 | if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().4 { |
| 123 | return 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/::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().( |
| 124 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 125 | "invalid message length: parsing u32", |
| 126 | )); |
| 127 | } |
| 128 | |
| 129 | let total_len = len as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1; |
| 130 | if buf.lenrust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]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().total_len { |
| 131 | let to_read = total_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().buf.lenrust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]len().(); |
| 132 | buf.reserverust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]reserve().(to_read); |
| 133 | return 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#); |
| 134 | } |
| 135 | |
| 136 | let mut buf = Bufferrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer# { |
| 137 | bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#bytes.: buf.split_torust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]split_to().(total_len).freezerust-analyzer cargo bytes 1.11.1 bytes_mut/impl#[BytesMut]freeze().(), |
| 138 | idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx.: 5, |
| 139 | }; |
| 140 | |
| 141 | let message = match tag { |
| 142 | PARSE_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PARSE_COMPLETE_TAG. => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::ParseCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ParseComplete#, |
| 143 | BIND_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BIND_COMPLETE_TAG. => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::BindCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#BindComplete#, |
| 144 | CLOSE_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CLOSE_COMPLETE_TAG. => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::CloseCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CloseComplete#, |
| 145 | NOTIFICATION_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NOTIFICATION_RESPONSE_TAG. => { |
| 146 | let process_id = buf.read_i32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 147 | let channel = buf.read_cstrrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_cstr().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 148 | let message = buf.read_cstrrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_cstr().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 149 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::NotificationResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#NotificationResponse#(NotificationResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody# { |
| 150 | process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#process_id., |
| 151 | channelrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#channel., |
| 152 | messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#message., |
| 153 | }) |
| 154 | } |
| 155 | COPY_DONE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_DONE_TAG. => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::CopyDonerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyDone#, |
| 156 | COMMAND_COMPLETE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COMMAND_COMPLETE_TAG. => { |
| 157 | let tag = buf.read_cstrrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_cstr().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 158 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::CommandCompleterust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CommandComplete#(CommandCompleteBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CommandCompleteBody# { tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CommandCompleteBody#tag. }) |
| 159 | } |
| 160 | COPY_DATA_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_DATA_TAG. => { |
| 161 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 162 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::CopyDatarust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyData#(CopyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody# { storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody#storage. }) |
| 163 | } |
| 164 | DATA_ROW_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DATA_ROW_TAG. => { |
| 165 | let len = buf.read_u16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 166 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 167 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::DataRowrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#DataRow#(DataRowBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody# { storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#storage., lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#len. }) |
| 168 | } |
| 169 | ERROR_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ERROR_RESPONSE_TAG. => { |
| 170 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 171 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::ErrorResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ErrorResponse#(ErrorResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorResponseBody# { storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorResponseBody#storage. }) |
| 172 | } |
| 173 | COPY_IN_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_IN_RESPONSE_TAG. => { |
| 174 | let format = buf.read_u8rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u8().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 175 | let len = buf.read_u16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 176 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 177 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::CopyInResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyInResponse#(CopyInResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody# { |
| 178 | formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#format., |
| 179 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#len., |
| 180 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#storage., |
| 181 | }) |
| 182 | } |
| 183 | COPY_OUT_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/COPY_OUT_RESPONSE_TAG. => { |
| 184 | let format = buf.read_u8rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u8().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 185 | let len = buf.read_u16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 186 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 187 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::CopyOutResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#CopyOutResponse#(CopyOutResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody# { |
| 188 | formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#format., |
| 189 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#len., |
| 190 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#storage., |
| 191 | }) |
| 192 | } |
| 193 | EMPTY_QUERY_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/EMPTY_QUERY_RESPONSE_TAG. => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::EmptyQueryResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#EmptyQueryResponse#, |
| 194 | BACKEND_KEY_DATA_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BACKEND_KEY_DATA_TAG. => { |
| 195 | let process_id = buf.read_i32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 196 | let secret_key = buf.read_i32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 197 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::BackendKeyDatarust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#BackendKeyData#(BackendKeyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody# { |
| 198 | process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody#process_id., |
| 199 | secret_keyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody#secret_key., |
| 200 | }) |
| 201 | } |
| 202 | NO_DATA_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NO_DATA_TAG. => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::NoDatarust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#NoData#, |
| 203 | NOTICE_RESPONSE_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NOTICE_RESPONSE_TAG. => { |
| 204 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 205 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::NoticeResponserust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#NoticeResponse#(NoticeResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NoticeResponseBody# { storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/NoticeResponseBody#storage. }) |
| 206 | } |
| 207 | AUTHENTICATION_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AUTHENTICATION_TAG. => match buf.read_i32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). { |
| 208 | 0 => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationOkrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationOk#, |
| 209 | 2 => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationKerberosV5rust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationKerberosV5#, |
| 210 | 3 => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationCleartextPasswordrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationCleartextPassword#, |
| 211 | 5 => { |
| 212 | let mut salt = [0; 4]; |
| 213 | buf.read_exactrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#read_exact().(&mut salt)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 214 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationMd5Passwordrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationMd5Password#(AuthenticationMd5PasswordBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationMd5PasswordBody# { saltrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationMd5PasswordBody#salt. }) |
| 215 | } |
| 216 | 6 => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationScmCredentialrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationScmCredential#, |
| 217 | 7 => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationGssrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationGss#, |
| 218 | 8 => { |
| 219 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 220 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationGssContinuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationGssContinue#(AuthenticationGssContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationGssContinueBody#(storage)) |
| 221 | } |
| 222 | 9 => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationSspirust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSspi#, |
| 223 | 10 => { |
| 224 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 225 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationSaslrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSasl#(AuthenticationSaslBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslBody#(storage)) |
| 226 | } |
| 227 | 11 => { |
| 228 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 229 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationSaslContinuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSaslContinue#(AuthenticationSaslContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslContinueBody#(storage)) |
| 230 | } |
| 231 | 12 => { |
| 232 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 233 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::AuthenticationSaslFinalrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#AuthenticationSaslFinal#(AuthenticationSaslFinalBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslFinalBody#(storage)) |
| 234 | } |
| 235 | tag => { |
| 236 | return 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/::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().( |
| 237 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 238 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("unknown authentication tag `{tag}`"), |
| 239 | )); |
| 240 | } |
| 241 | }, |
| 242 | PORTAL_SUSPENDED_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PORTAL_SUSPENDED_TAG. => Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::PortalSuspendedrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#PortalSuspended#, |
| 243 | PARAMETER_STATUS_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PARAMETER_STATUS_TAG. => { |
| 244 | let name = buf.read_cstrrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_cstr().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 245 | let value = buf.read_cstrrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_cstr().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 246 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::ParameterStatusrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ParameterStatus#(ParameterStatusBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody# { namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody#name., valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody#value. }) |
| 247 | } |
| 248 | PARAMETER_DESCRIPTION_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/PARAMETER_DESCRIPTION_TAG. => { |
| 249 | let len = buf.read_u16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 250 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 251 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::ParameterDescriptionrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ParameterDescription#(ParameterDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody# { storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody#storage., lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody#len. }) |
| 252 | } |
| 253 | ROW_DESCRIPTION_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ROW_DESCRIPTION_TAG. => { |
| 254 | let len = buf.read_u16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 255 | let storage = buf.read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(); |
| 256 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::RowDescriptionrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#RowDescription#(RowDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody# { storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody#storage., lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody#len. }) |
| 257 | } |
| 258 | READY_FOR_QUERY_TAGrust-analyzer cargo postgres-protocol 0.6.12 message/backend/READY_FOR_QUERY_TAG. => { |
| 259 | let status = buf.read_u8rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u8().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 260 | Messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#::ReadyForQueryrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Message#ReadyForQuery#(ReadyForQueryBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ReadyForQueryBody# { statusrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ReadyForQueryBody#status. }) |
| 261 | } |
| 262 | tag => { |
| 263 | return 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/::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().( |
| 264 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 265 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("unknown message tag `{tag}`"), |
| 266 | )); |
| 267 | } |
| 268 | }; |
| 269 | |
| 270 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().buf.is_emptyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]is_empty().() { |
| 271 | return 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/::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().( |
| 272 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 273 | "invalid message length: expected buffer to be empty", |
| 274 | )); |
| 275 | } |
| 276 | |
| 277 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(message)) |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | struct Bufferrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer# { |
| 282 | bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#bytes.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 283 | idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx.: usize, |
| 284 | } |
| 285 | |
| 286 | impl Bufferrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer# { |
| 287 | #[inline] |
| 288 | fn slicerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]slice().(&self) -> &[u8] { |
| 289 | &self.bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#bytes.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().self.idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). |
| 290 | } |
| 291 | |
| 292 | #[inline] |
| 293 | fn is_emptyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]is_empty().(&self) -> bool { |
| 294 | self.slicerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]slice().().is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() |
| 295 | } |
| 296 | |
| 297 | #[inline] |
| 298 | fn read_cstrrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_cstr().(&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#<Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#> { |
| 299 | match memchrrust-analyzer cargo memchr 2.8.1 memchr/memchr().(0, self.slicerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]slice().()) { |
| 300 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pos) => { |
| 301 | let start = self.idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx.; |
| 302 | let end = start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().pos; |
| 303 | let cstr = self.bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#bytes..slicerust-analyzer cargo bytes 1.11.1 bytes/impl#[Bytes]slice().(start..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#end); |
| 304 | self.idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx. = end rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1; |
| 305 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(cstr) |
| 306 | } |
| 307 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => 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/::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().( |
| 308 | 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#, |
| 309 | "unexpected EOF", |
| 310 | )), |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | #[inline] |
| 315 | fn read_allrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]read_all().(&mut self) -> Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes# { |
| 316 | let buf = self.bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#bytes..slicerust-analyzer cargo bytes 1.11.1 bytes/impl#[Bytes]slice().(self.idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#); |
| 317 | self.idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx. = self.bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#bytes..lenrust-analyzer cargo bytes 1.11.1 bytes/impl#[Bytes]len().(); |
| 318 | buf |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | impl Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read# for Bufferrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer# { |
| 323 | #[inline] |
| 324 | fn readrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer][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> { |
| 325 | let len = { |
| 326 | let slice = self.slicerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[Buffer]slice().(); |
| 327 | let len = cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/min().(slice.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().(), buf.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()); |
| 328 | buf[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#len]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut()..copy_from_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]copy_from_slice().(&slice[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 ops/range/RangeTo#len]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().); |
| 329 | len |
| 330 | }; |
| 331 | self.idxrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Buffer#idx. 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().len; |
| 332 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(len) |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | pub struct AuthenticationMd5PasswordBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationMd5PasswordBody# { |
| 337 | saltrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationMd5PasswordBody#salt.: [u8; 4], |
| 338 | } |
| 339 | |
| 340 | impl AuthenticationMd5PasswordBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationMd5PasswordBody# { |
| 341 | #[inline] |
| 342 | pub fn saltrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[AuthenticationMd5PasswordBody]salt().(&self) -> [u8; 4] { |
| 343 | self.saltrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationMd5PasswordBody#salt. |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | pub struct AuthenticationGssContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationGssContinueBody#(Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#); |
| 348 | |
| 349 | impl AuthenticationGssContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationGssContinueBody# { |
| 350 | #[inline] |
| 351 | pub fn datarust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[AuthenticationGssContinueBody]data().(&self) -> &[u8] { |
| 352 | &self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationGssContinueBody#0. |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | pub struct AuthenticationSaslBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslBody#(Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#); |
| 357 | |
| 358 | impl AuthenticationSaslBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslBody# { |
| 359 | #[inline] |
| 360 | pub fn mechanismsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[AuthenticationSaslBody]mechanisms().(&self) -> SaslMechanismsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#<'_> { |
| 361 | SaslMechanismsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#(&self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslBody#0.) |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | pub struct SaslMechanismsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#<'a>(&'a [u8]); |
| 366 | |
| 367 | impl<'a> FallibleIteratorrust-analyzer cargo fallible-iterator 0.3.0 FallibleIterator# for SaslMechanismsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#<'a> { |
| 368 | type Itemrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`SaslMechanisms<'a>`][FallibleIterator]Item# = &'a str; |
| 369 | type Errorrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`SaslMechanisms<'a>`][FallibleIterator]Error# = 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#; |
| 370 | |
| 371 | #[inline] |
| 372 | fn nextrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`SaslMechanisms<'a>`][FallibleIterator]next().(&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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>> { |
| 373 | let value_end = find_nullrust-analyzer cargo postgres-protocol 0.6.12 message/backend/find_null().(self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#0., 0)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 374 | if value_end 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 { |
| 375 | if self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#0..lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]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().1 { |
| 376 | return 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/::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().( |
| 377 | 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#, |
| 378 | "invalid message length: expected to be at end of iterator for sasl", |
| 379 | )); |
| 380 | } |
| 381 | 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#) |
| 382 | } else { |
| 383 | let value = get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(&self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#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 ops/range/RangeTo#value_end]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 result/impl#[`Result<T, E>`][Try]branch().; |
| 384 | self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#0. = &self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/SaslMechanisms#0.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().value_end rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 385 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(value)) |
| 386 | } |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | pub struct AuthenticationSaslContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslContinueBody#(Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#); |
| 391 | |
| 392 | impl AuthenticationSaslContinueBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslContinueBody# { |
| 393 | #[inline] |
| 394 | pub fn datarust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[AuthenticationSaslContinueBody]data().(&self) -> &[u8] { |
| 395 | &self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslContinueBody#0. |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | pub struct AuthenticationSaslFinalBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslFinalBody#(Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#); |
| 400 | |
| 401 | impl AuthenticationSaslFinalBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslFinalBody# { |
| 402 | #[inline] |
| 403 | pub fn datarust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[AuthenticationSaslFinalBody]data().(&self) -> &[u8] { |
| 404 | &self.0rust-analyzer cargo postgres-protocol 0.6.12 message/backend/AuthenticationSaslFinalBody#0. |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | pub struct BackendKeyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody# { |
| 409 | process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody#process_id.: i32, |
| 410 | secret_keyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody#secret_key.: i32, |
| 411 | } |
| 412 | |
| 413 | impl BackendKeyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody# { |
| 414 | #[inline] |
| 415 | pub fn process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[BackendKeyDataBody]process_id().(&self) -> i32 { |
| 416 | self.process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody#process_id. |
| 417 | } |
| 418 | |
| 419 | #[inline] |
| 420 | pub fn secret_keyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[BackendKeyDataBody]secret_key().(&self) -> i32 { |
| 421 | self.secret_keyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/BackendKeyDataBody#secret_key. |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | pub struct CommandCompleteBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CommandCompleteBody# { |
| 426 | tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CommandCompleteBody#tag.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 427 | } |
| 428 | |
| 429 | impl CommandCompleteBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CommandCompleteBody# { |
| 430 | #[inline] |
| 431 | pub fn tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[CommandCompleteBody]tag().(&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#<&str> { |
| 432 | get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(&self.tagrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CommandCompleteBody#tag.) |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | pub struct CopyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody# { |
| 437 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 438 | } |
| 439 | |
| 440 | impl CopyDataBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody# { |
| 441 | #[inline] |
| 442 | pub fn datarust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[CopyDataBody]data().(&self) -> &[u8] { |
| 443 | &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody#storage. |
| 444 | } |
| 445 | |
| 446 | #[inline] |
| 447 | pub fn into_bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[CopyDataBody]into_bytes().(self) -> Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes# { |
| 448 | self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyDataBody#storage. |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | pub struct CopyInResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody# { |
| 453 | formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#format.: u8, |
| 454 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#len.: u16, |
| 455 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 456 | } |
| 457 | |
| 458 | impl CopyInResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody# { |
| 459 | #[inline] |
| 460 | pub fn formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[CopyInResponseBody]format().(&self) -> u8 { |
| 461 | self.formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#format. |
| 462 | } |
| 463 | |
| 464 | #[inline] |
| 465 | pub fn column_formatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[CopyInResponseBody]column_formats().(&self) -> ColumnFormatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#<'_> { |
| 466 | ColumnFormatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats# { |
| 467 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#remaining.: self.lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#len., |
| 468 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#buf.: &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyInResponseBody#storage., |
| 469 | } |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | pub struct ColumnFormatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#<'a> { |
| 474 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#buf.: &'a [u8], |
| 475 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#remaining.: u16, |
| 476 | } |
| 477 | |
| 478 | impl FallibleIteratorrust-analyzer cargo fallible-iterator 0.3.0 FallibleIterator# for ColumnFormatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#<'_> { |
| 479 | type Itemrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ColumnFormats<'_>`][FallibleIterator]Item# = u16; |
| 480 | type Errorrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ColumnFormats<'_>`][FallibleIterator]Error# = 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#; |
| 481 | |
| 482 | #[inline] |
| 483 | fn nextrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ColumnFormats<'_>`][FallibleIterator]next().(&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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>> { |
| 484 | if self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0 { |
| 485 | if self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#buf..is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() { |
| 486 | return 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#); |
| 487 | } else { |
| 488 | return 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/::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().( |
| 489 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 490 | "invalid message length: wrong column formats", |
| 491 | )); |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().1; |
| 496 | self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#buf..read_u16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>().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#) |
| 497 | } |
| 498 | |
| 499 | #[inline] |
| 500 | fn size_hintrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ColumnFormats<'_>`][FallibleIterator]size_hint().(&self) -> (usize, Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>) { |
| 501 | let len = self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#remaining. as usize; |
| 502 | (len, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(len)) |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | pub struct CopyOutResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody# { |
| 507 | formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#format.: u8, |
| 508 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#len.: u16, |
| 509 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 510 | } |
| 511 | |
| 512 | impl CopyOutResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody# { |
| 513 | #[inline] |
| 514 | pub fn formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[CopyOutResponseBody]format().(&self) -> u8 { |
| 515 | self.formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#format. |
| 516 | } |
| 517 | |
| 518 | #[inline] |
| 519 | pub fn column_formatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[CopyOutResponseBody]column_formats().(&self) -> ColumnFormatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#<'_> { |
| 520 | ColumnFormatsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats# { |
| 521 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#remaining.: self.lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#len., |
| 522 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ColumnFormats#buf.: &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/CopyOutResponseBody#storage., |
| 523 | } |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | #[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:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 528 | pub struct DataRowBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody# { |
| 529 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 530 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#len.: u16, |
| 531 | } |
| 532 | |
| 533 | impl DataRowBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody# { |
| 534 | #[inline] |
| 535 | pub fn rangesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[DataRowBody]ranges().(&self) -> DataRowRangesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#<'_> { |
| 536 | DataRowRangesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges# { |
| 537 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf.: &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#storage., |
| 538 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#len.: self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#storage..lenrust-analyzer cargo bytes 1.11.1 bytes/impl#[Bytes]len().(), |
| 539 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#remaining.: self.lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#len., |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | #[inline] |
| 544 | pub fn bufferrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[DataRowBody]buffer().(&self) -> &[u8] { |
| 545 | &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#storage. |
| 546 | } |
| 547 | |
| 548 | #[inline] |
| 549 | pub fn buffer_bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[DataRowBody]buffer_bytes().(&self) -> &Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes# { |
| 550 | &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowBody#storage. |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | pub struct DataRowRangesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#<'a> { |
| 555 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf.: &'a [u8], |
| 556 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#len.: usize, |
| 557 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#remaining.: u16, |
| 558 | } |
| 559 | |
| 560 | impl FallibleIteratorrust-analyzer cargo fallible-iterator 0.3.0 FallibleIterator# for DataRowRangesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#<'_> { |
| 561 | type Itemrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`DataRowRanges<'_>`][FallibleIterator]Item# = Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Rangerust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#<usize>>; |
| 562 | type Errorrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`DataRowRanges<'_>`][FallibleIterator]Error# = 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#; |
| 563 | |
| 564 | #[inline] |
| 565 | fn nextrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`DataRowRanges<'_>`][FallibleIterator]next().(&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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Rangerust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#<usize>>>> { |
| 566 | if self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0 { |
| 567 | if self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf..is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() { |
| 568 | return 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#); |
| 569 | } else { |
| 570 | return 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/::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().( |
| 571 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 572 | "invalid message length: datarowrange is not empty", |
| 573 | )); |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().1; |
| 578 | let len = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf..read_i32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 579 | if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { |
| 580 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#)) |
| 581 | } else { |
| 582 | let len = len as usize; |
| 583 | if self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf..lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]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().len { |
| 584 | return 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/::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().( |
| 585 | 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#, |
| 586 | "unexpected EOF", |
| 587 | )); |
| 588 | } |
| 589 | let base = self.lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf..lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().(); |
| 590 | self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf. = &self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#buf.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().len..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 591 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(base..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#base rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().len))) |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | #[inline] |
| 596 | fn size_hintrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`DataRowRanges<'_>`][FallibleIterator]size_hint().(&self) -> (usize, Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>) { |
| 597 | let len = self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/DataRowRanges#remaining. as usize; |
| 598 | (len, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(len)) |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | pub struct ErrorResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorResponseBody# { |
| 603 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorResponseBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 604 | } |
| 605 | |
| 606 | impl ErrorResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorResponseBody# { |
| 607 | #[inline] |
| 608 | pub fn fieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[ErrorResponseBody]fields().(&self) -> ErrorFieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#<'_> { |
| 609 | ErrorFieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields# { bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf.: &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorResponseBody#storage. } |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | pub struct ErrorFieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#<'a> { |
| 614 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf.: &'a [u8], |
| 615 | } |
| 616 | |
| 617 | impl<'a> FallibleIteratorrust-analyzer cargo fallible-iterator 0.3.0 FallibleIterator# for ErrorFieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#<'a> { |
| 618 | type Itemrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ErrorFields<'a>`][FallibleIterator]Item# = ErrorFieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#<'a>; |
| 619 | type Errorrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ErrorFields<'a>`][FallibleIterator]Error# = 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#; |
| 620 | |
| 621 | #[inline] |
| 622 | fn nextrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ErrorFields<'a>`][FallibleIterator]next().(&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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<ErrorFieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#<'a>>> { |
| 623 | let type_ = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf..read_u8rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u8().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 624 | if type_ 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().0 { |
| 625 | if self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf..is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() { |
| 626 | return 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#); |
| 627 | } else { |
| 628 | return 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/::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().( |
| 629 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 630 | "invalid message length: error fields is not drained", |
| 631 | )); |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | let value_end = find_nullrust-analyzer cargo postgres-protocol 0.6.12 message/backend/find_null().(self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf., 0)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 636 | let value = &self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf.[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 ops/range/RangeTo#value_end]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 637 | self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf. = &self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().value_end rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 638 | |
| 639 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ErrorFieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField# { type_rust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#type_., valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#value. })) |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | pub struct ErrorFieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#<'a> { |
| 644 | type_rust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#type_.: u8, |
| 645 | valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#value.: &'a [u8], |
| 646 | } |
| 647 | |
| 648 | impl ErrorFieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#<'_> { |
| 649 | #[inline] |
| 650 | pub fn type_rust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ErrorField<'_>`]type_().(&self) -> u8 { |
| 651 | self.type_rust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#type_. |
| 652 | } |
| 653 | |
| 654 | #[inline] |
| 655 | #[deprecated(note = "use value_bytes instead", since = "0.6.7")] |
| 656 | pub fn valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ErrorField<'_>`]value().(&self) -> &str { |
| 657 | strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(self.valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#value.).expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("error field value contained non-UTF8 bytes") |
| 658 | } |
| 659 | |
| 660 | #[inline] |
| 661 | pub fn value_bytesrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`ErrorField<'_>`]value_bytes().(&self) -> &[u8] { |
| 662 | self.valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorField#value. |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | pub struct NoticeResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NoticeResponseBody# { |
| 667 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/NoticeResponseBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 668 | } |
| 669 | |
| 670 | impl NoticeResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NoticeResponseBody# { |
| 671 | #[inline] |
| 672 | pub fn fieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[NoticeResponseBody]fields().(&self) -> ErrorFieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#<'_> { |
| 673 | ErrorFieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields# { bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ErrorFields#buf.: &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/NoticeResponseBody#storage. } |
| 674 | } |
| 675 | } |
| 676 | |
| 677 | pub struct NotificationResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody# { |
| 678 | process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#process_id.: i32, |
| 679 | channelrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#channel.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 680 | messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#message.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 681 | } |
| 682 | |
| 683 | impl NotificationResponseBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody# { |
| 684 | #[inline] |
| 685 | pub fn process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[NotificationResponseBody]process_id().(&self) -> i32 { |
| 686 | self.process_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#process_id. |
| 687 | } |
| 688 | |
| 689 | #[inline] |
| 690 | pub fn channelrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[NotificationResponseBody]channel().(&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#<&str> { |
| 691 | get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(&self.channelrust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#channel.) |
| 692 | } |
| 693 | |
| 694 | #[inline] |
| 695 | pub fn messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[NotificationResponseBody]message().(&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#<&str> { |
| 696 | get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(&self.messagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/NotificationResponseBody#message.) |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | pub struct ParameterDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody# { |
| 701 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 702 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody#len.: u16, |
| 703 | } |
| 704 | |
| 705 | impl ParameterDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody# { |
| 706 | #[inline] |
| 707 | pub fn parametersrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[ParameterDescriptionBody]parameters().(&self) -> Parametersrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#<'_> { |
| 708 | Parametersrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters# { |
| 709 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#buf.: &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody#storage., |
| 710 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#remaining.: self.lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterDescriptionBody#len., |
| 711 | } |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | pub struct Parametersrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#<'a> { |
| 716 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#buf.: &'a [u8], |
| 717 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#remaining.: u16, |
| 718 | } |
| 719 | |
| 720 | impl FallibleIteratorrust-analyzer cargo fallible-iterator 0.3.0 FallibleIterator# for Parametersrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#<'_> { |
| 721 | type Itemrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Parameters<'_>`][FallibleIterator]Item# = Oidrust-analyzer cargo postgres-protocol 0.6.12 Oid#; |
| 722 | type Errorrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Parameters<'_>`][FallibleIterator]Error# = 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#; |
| 723 | |
| 724 | #[inline] |
| 725 | fn nextrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Parameters<'_>`][FallibleIterator]next().(&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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Oidrust-analyzer cargo postgres-protocol 0.6.12 Oid#>> { |
| 726 | if self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0 { |
| 727 | if self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#buf..is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() { |
| 728 | return 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#); |
| 729 | } else { |
| 730 | return 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/::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().( |
| 731 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 732 | "invalid message length: parameters is not drained", |
| 733 | )); |
| 734 | } |
| 735 | } |
| 736 | |
| 737 | self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().1; |
| 738 | self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#buf..read_u32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>().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#) |
| 739 | } |
| 740 | |
| 741 | #[inline] |
| 742 | fn size_hintrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Parameters<'_>`][FallibleIterator]size_hint().(&self) -> (usize, Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>) { |
| 743 | let len = self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Parameters#remaining. as usize; |
| 744 | (len, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(len)) |
| 745 | } |
| 746 | } |
| 747 | |
| 748 | pub struct ParameterStatusBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody# { |
| 749 | namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody#name.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 750 | valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody#value.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 751 | } |
| 752 | |
| 753 | impl ParameterStatusBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody# { |
| 754 | #[inline] |
| 755 | pub fn namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[ParameterStatusBody]name().(&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#<&str> { |
| 756 | get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(&self.namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody#name.) |
| 757 | } |
| 758 | |
| 759 | #[inline] |
| 760 | pub fn valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[ParameterStatusBody]value().(&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#<&str> { |
| 761 | get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(&self.valuerust-analyzer cargo postgres-protocol 0.6.12 message/backend/ParameterStatusBody#value.) |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | pub struct ReadyForQueryBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ReadyForQueryBody# { |
| 766 | statusrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ReadyForQueryBody#status.: u8, |
| 767 | } |
| 768 | |
| 769 | impl ReadyForQueryBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ReadyForQueryBody# { |
| 770 | #[inline] |
| 771 | pub fn statusrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[ReadyForQueryBody]status().(&self) -> u8 { |
| 772 | self.statusrust-analyzer cargo postgres-protocol 0.6.12 message/backend/ReadyForQueryBody#status. |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | pub struct RowDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody# { |
| 777 | storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody#storage.: Bytesrust-analyzer cargo bytes 1.11.1 bytes/Bytes#, |
| 778 | lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody#len.: u16, |
| 779 | } |
| 780 | |
| 781 | impl RowDescriptionBodyrust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody# { |
| 782 | #[inline] |
| 783 | pub fn fieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[RowDescriptionBody]fields().(&self) -> Fieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#<'_> { |
| 784 | Fieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields# { |
| 785 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf.: &self.storagerust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody#storage., |
| 786 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#remaining.: self.lenrust-analyzer cargo postgres-protocol 0.6.12 message/backend/RowDescriptionBody#len., |
| 787 | } |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | pub struct Fieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#<'a> { |
| 792 | bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf.: &'a [u8], |
| 793 | remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#remaining.: u16, |
| 794 | } |
| 795 | |
| 796 | impl<'a> FallibleIteratorrust-analyzer cargo fallible-iterator 0.3.0 FallibleIterator# for Fieldsrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#<'a> { |
| 797 | type Itemrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Fields<'a>`][FallibleIterator]Item# = Fieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#<'a>; |
| 798 | type Errorrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Fields<'a>`][FallibleIterator]Error# = 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#; |
| 799 | |
| 800 | #[inline] |
| 801 | fn nextrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Fields<'a>`][FallibleIterator]next().(&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#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Fieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#<'a>>> { |
| 802 | if self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0 { |
| 803 | if self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf..is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() { |
| 804 | return 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#); |
| 805 | } else { |
| 806 | return 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/::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().( |
| 807 | iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, |
| 808 | "invalid message length: field is not drained", |
| 809 | )); |
| 810 | } |
| 811 | } |
| 812 | |
| 813 | self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#remaining. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().1; |
| 814 | let name_end = find_nullrust-analyzer cargo postgres-protocol 0.6.12 message/backend/find_null().(self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf., 0)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 815 | let name = get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(&self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf.[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 ops/range/RangeTo#name_end]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 result/impl#[`Result<T, E>`][Try]branch().; |
| 816 | self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf. = &self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().name_end rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 817 | let table_oid = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf..read_u32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 818 | let column_id = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf..read_i16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 819 | let type_oid = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf..read_u32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_u32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 820 | let type_size = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf..read_i16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 821 | let type_modifier = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf..read_i32rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i32().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 822 | let format = self.bufrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#buf..read_i16rust-analyzer cargo byteorder 1.5.0 io/ReadBytesExt#read_i16().::<BigEndianrust-analyzer cargo byteorder 1.5.0 BigEndian#>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 823 | |
| 824 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Fieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field# { |
| 825 | namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#name., |
| 826 | table_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#table_oid., |
| 827 | column_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#column_id., |
| 828 | type_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_oid., |
| 829 | type_sizerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_size., |
| 830 | type_modifierrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_modifier., |
| 831 | formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#format., |
| 832 | })) |
| 833 | } |
| 834 | |
| 835 | #[inline] |
| 836 | fn size_hintrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Fields<'a>`][FallibleIterator]size_hint().(&self) -> (usize, Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>) { |
| 837 | let len = self.remainingrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Fields#remaining. as usize; |
| 838 | (len, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(len)) |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | pub struct Fieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#<'a> { |
| 843 | namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#name.: &'a str, |
| 844 | table_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#table_oid.: Oidrust-analyzer cargo postgres-protocol 0.6.12 Oid#, |
| 845 | column_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#column_id.: i16, |
| 846 | type_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_oid.: Oidrust-analyzer cargo postgres-protocol 0.6.12 Oid#, |
| 847 | type_sizerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_size.: i16, |
| 848 | type_modifierrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_modifier.: i32, |
| 849 | formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#format.: i16, |
| 850 | } |
| 851 | |
| 852 | impl<'a> Fieldrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#<'a> { |
| 853 | #[inline] |
| 854 | pub fn namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Field<'a>`]name().(&self) -> &'a str { |
| 855 | self.namerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#name. |
| 856 | } |
| 857 | |
| 858 | #[inline] |
| 859 | pub fn table_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Field<'a>`]table_oid().(&self) -> Oidrust-analyzer cargo postgres-protocol 0.6.12 Oid# { |
| 860 | self.table_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#table_oid. |
| 861 | } |
| 862 | |
| 863 | #[inline] |
| 864 | pub fn column_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Field<'a>`]column_id().(&self) -> i16 { |
| 865 | self.column_idrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#column_id. |
| 866 | } |
| 867 | |
| 868 | #[inline] |
| 869 | pub fn type_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Field<'a>`]type_oid().(&self) -> Oidrust-analyzer cargo postgres-protocol 0.6.12 Oid# { |
| 870 | self.type_oidrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_oid. |
| 871 | } |
| 872 | |
| 873 | #[inline] |
| 874 | pub fn type_sizerust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Field<'a>`]type_size().(&self) -> i16 { |
| 875 | self.type_sizerust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_size. |
| 876 | } |
| 877 | |
| 878 | #[inline] |
| 879 | pub fn type_modifierrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Field<'a>`]type_modifier().(&self) -> i32 { |
| 880 | self.type_modifierrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#type_modifier. |
| 881 | } |
| 882 | |
| 883 | #[inline] |
| 884 | pub fn formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/impl#[`Field<'a>`]format().(&self) -> i16 { |
| 885 | self.formatrust-analyzer cargo postgres-protocol 0.6.12 message/backend/Field#format. |
| 886 | } |
| 887 | } |
| 888 | |
| 889 | #[inline] |
| 890 | fn find_nullrust-analyzer cargo postgres-protocol 0.6.12 message/backend/find_null().(buf: &[u8], start: usize) -> 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> { |
| 891 | match memchrrust-analyzer cargo memchr 2.8.1 memchr/memchr().(0, &buf[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().) { |
| 892 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pos) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(pos rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().start), |
| 893 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => 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/::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().( |
| 894 | 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#, |
| 895 | "unexpected EOF", |
| 896 | )), |
| 897 | } |
| 898 | } |
| 899 | |
| 900 | #[inline] |
| 901 | fn get_strrust-analyzer cargo postgres-protocol 0.6.12 message/backend/get_str().(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#<&str> { |
| 902 | strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(buf).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| 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#::InvalidInputrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#InvalidInput#, e)) |
| 903 | } |