pub fn write_pending<E: Encoder>(
enc: &mut E,
w: &mut impl Write,
) -> Result<usize>Expand description
Write every byte enc has pending to w, then consume it. Returns how
many bytes were written.
The drain step of a streaming encode, without the footgun of forgetting
consume_output and sending the same bytes
twice. On an I/O error nothing is consumed, and the bytes w accepted
before the error are unknown: abort the transport.