macro_rules! serialize { ($protocol:ty, $serializer:expr) => { ... }; }
Expand description
Protocol::serializer wants the same serializer closure passed twice so that it can specialize it for two types: once to compute the size, and a second time to actually serialize the content. This macro helps by taking the factory type and applying the serializer expression twice.