macro_rules! codec { ($x:ident) => { ... }; ($x:ident, {$ser:expr, $de:expr}) => { ... }; }
Define a codec type and implement the Codec trait