| 1 | use crate::message::{FrontendMessage, FrontendMessageFormat}; |
| 2 | use sqlx_core::Error; |
| 3 | use std::num::Saturating; |
| 4 | |
| 5 | pub struct Terminate; |
| 6 | |
| 7 | impl FrontendMessage for Terminate { |
| 8 | const FORMAT: FrontendMessageFormat = FrontendMessageFormat::Terminate; |
| 9 | |
| 10 | #[inline(always)] |
| 11 | fn body_size_hint(&self) -> Saturating<usize> { |
| 12 | Saturating(0) |
| 13 | } |
| 14 | |
| 15 | #[inline(always)] |
| 16 | fn encode_body(&self, _buf: &mut Vec<u8>) -> Result<(), Error> { |
| 17 | Ok(()) |
| 18 | } |
| 19 | } |