1 2 3 4 5 6 7 8 9 10
use crate::io::Encode;
pub struct Terminate;
impl Encode<'_> for Terminate {
fn encode_with(&self, buf: &mut Vec<u8>, _: ()) {
buf.push(b'X');
buf.extend(&4_u32.to_be_bytes());
}
}
1 2 3 4 5 6 7 8 9 10
use crate::io::Encode;
pub struct Terminate;
impl Encode<'_> for Terminate {
fn encode_with(&self, buf: &mut Vec<u8>, _: ()) {
buf.push(b'X');
buf.extend(&4_u32.to_be_bytes());
}
}