| 1 | use crate::io::ProtocolEncode; |
| 2 | use crate::protocol::Capabilities; |
| 3 | |
| 4 | // https://dev.mysql.com/doc/internals/en/com-quit.html |
| 5 | |
| 6 | #[derive(Debug)] |
| 7 | pub(crate) struct Quit; |
| 8 | |
| 9 | impl ProtocolEncode<'_, Capabilities> for Quit { |
| 10 | fn encode_with(&self, buf: &mut Vec<u8>, _: Capabilities) -> Result<(), crate::Error> { |
| 11 | buf.push(0x01); // COM_QUIT |
| 12 | Ok(()) |
| 13 | } |
| 14 | } |