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