1 use super::prelude::*; 2 3 #[derive(Debug)] 4 pub struct vAttach { 5 pub pid: Pid, 6 } 7 8 impl<'a> ParseCommand<'a> for vAttach { from_packet(buf: PacketBuf<'a>) -> Option<Self>9 fn from_packet(buf: PacketBuf<'a>) -> Option<Self> { 10 crate::__dead_code_marker!("vAttach", "from_packet"); 11 12 let body = buf.into_body(); 13 let pid = match body { 14 [b';', pid @ ..] => Pid::new(decode_hex(pid).ok()?)?, 15 _ => return None, 16 }; 17 Some(vAttach { pid }) 18 } 19 } 20