(input: &[u8])
| 166 | } |
| 167 | |
| 168 | async fn parse_startup_message_safely(input: &[u8]) -> Result<StartupMessage, Box<dyn std::error::Error>> { |
| 169 | let mut cursor = Cursor::new(input); |
| 170 | let parser = MessageParser::new(); |
| 171 | |
| 172 | match parser.parse_startup_message(&mut cursor).await { |
| 173 | Ok(msg) => Ok(msg), |
| 174 | Err(e) => Err(Box::new(e)) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | async fn parse_auth_message_safely(input: &[u8]) -> Result<AuthenticationRequest, Box<dyn std::error::Error>> { |
| 179 | let mut cursor = Cursor::new(input); |
no test coverage detected