pub async fn write_frame_with_deadline<W, T>(
writer: &mut W,
msg: &T,
deadline: Option<Duration>,
) -> Result<(), WireError>Expand description
Write one length-prefixed JSON frame, with an optional total-operation deadline.
Deadline covers write_all(len) + write_all(body) + flush as one unit;
a partial write that times out leaves the writer in an unspecified state
(caller should close the connection).