pub async fn write_message<W, T>(
w: &mut W,
message: &T,
) -> Result<(), DaemonError>Expand description
Write one length-prefixed JSON message to w.
§Errors
Returns DaemonError::Io on a transport failure or
DaemonError::Protocol if the message serializes to a body
larger than MAX_MESSAGE_BYTES.