(&self, cursor: &mut Cursor<&[u8]>, _length: u32)
| 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()?; |
no test coverage detected