mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
15 lines
320 B
Rust
15 lines
320 B
Rust
use super::{BufMut, Encode};
|
|
|
|
pub struct CopyFail<'a> {
|
|
pub error: &'a str,
|
|
}
|
|
|
|
impl Encode for CopyFail<'_> {
|
|
fn encode(&self, buf: &mut Vec<u8>) {
|
|
buf.put_byte(b'f');
|
|
// len + nul + len(string)
|
|
buf.put_int_32((4 + 1 + self.error.len()) as i32);
|
|
buf.put_str(&self.error);
|
|
}
|
|
}
|