Debian Codegraph @

src/protocol/statement/stmt_close.rs

raw symbols SCIP
1 use crate::io::ProtocolEncode;
2 use crate::protocol::Capabilities;
3
4 // https://dev.mysql.com/doc/internals/en/com-stmt-close.html
5
6 #[derive(Debug)]
7 pub struct StmtClose {
8 pub statement: u32,
9 }
10
11 impl ProtocolEncode<'_, Capabilities> for StmtClose {
12 fn encode_with(&self, buf: &mut Vec<u8>, _: Capabilities) -> Result<(), crate::Error> {
13 buf.push(0x19); // COM_STMT_CLOSE
14 buf.extend(&self.statement.to_le_bytes());
15 Ok(())
16 }
17 }