1 2 3 4 5 6 7 8 9 10
macro_rules! impl_decode { ($i:path, $m:ident) => { impl $i { pub fn decode(bytes: bytes::Bytes) -> crate::DecodeResult<$i> { let mut decoder = crate::decode::Decoder::main(bytes); decoder.$m() } } }; }