Function encode

Source
pub async fn encode<W: AsyncWrite + Send + Unpin + 'static>(
    writer: Arc<Mutex<W>>,
    msg: RpcMessage,
) -> Result<(), Box<EncodeError>>
Expand description

Encode the given message into the BufWriter. Flushes the writer when finished.