MCPcopy Create free account
hub / github.com/erans/pgsqlite / parse_close

Method parse_close

src/protocol/parser.rs:320–332  ·  view source on GitHub ↗
(&self, cursor: &mut Cursor<&[u8]>, _length: u32)

Source from the content-addressed store, hash-verified

318 }
319
320 async fn parse_close(&self, cursor: &mut Cursor<&[u8]>, _length: u32) -> Result<FrontendMessage, ParseError> {
321 let close_type = cursor.read_u8()?;
322 let name = self.read_cstring(cursor).await?;
323
324 if close_type != b'S' && close_type != b'P' {
325 return Err(ParseError::ProtocolViolation("Invalid close type".to_string()));
326 }
327
328 Ok(FrontendMessage::Close {
329 typ: close_type,
330 name,
331 })
332 }
333
334 async fn parse_describe(&self, cursor: &mut Cursor<&[u8]>, _length: u32) -> Result<FrontendMessage, ParseError> {
335 let describe_type = cursor.read_u8()?;

Callers 1

parse_messageMethod · 0.80

Calls 1

read_cstringMethod · 0.80

Tested by

no test coverage detected