pub async fn write_frame<W: AsyncWrite + Unpin, T: Serialize>( writer: &mut W, message: &T, ) -> Result<()>