MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / parse_copy_message

Method parse_copy_message

src/protocol/parser.rs:152–170  ·  view source on GitHub ↗
(
        &self,
        length: usize,
        reader: &mut BufferReader<'_>,
        name: MessageName,
    )

Source from the content-addressed store, hash-verified

150 }
151
152 fn parse_copy_message(
153 &self,
154 length: usize,
155 reader: &mut BufferReader<'_>,
156 name: MessageName,
157 ) -> Result<BackendMessage> {
158 let is_binary = reader.byte()? != 0;
159 let column_count = reader.int16()? as usize;
160 let mut column_types = Vec::with_capacity(column_count);
161 for _ in 0..column_count {
162 column_types.push(reader.int16()?);
163 }
164 Ok(BackendMessage::CopyResponse(CopyResponse {
165 length,
166 name,
167 binary: is_binary,
168 column_types,
169 }))
170 }
171
172 fn parse_notification(
173 &self,

Callers 1

handle_packetMethod · 0.80

Calls 4

CopyResponseClass · 0.85
byteMethod · 0.80
int16Method · 0.80
pushMethod · 0.80

Tested by

no test coverage detected