pub trait ErasedCodecApi:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn tid(&self) -> Option<TypeId>;
fn name(&self) -> Arc<str>;
fn encode(
&self,
message: &AnyMessage,
output: &mut dyn Write,
) -> Result<(), AnyError>;
fn decode(&self, body: &[u8]) -> Result<AnyMessage, AnyError>;
}