pub trait ConnectionCodec:
Debug
+ Send
+ Sync {
// Required methods
fn try_encode(
&self,
value: &dyn Connection,
conn_options: &ConnectionOptions,
) -> Result<Vec<u8>>;
fn try_decode(
&self,
value: &[u8],
conn_options: &ConnectionOptions,
) -> Result<Arc<dyn Connection>>;
}