pub async fn write_all<S: AsyncWrite + Unpin>( stream: &mut S, bytes: &[u8], ) -> Result<()>
Write all bytes and confirm transport delivery before releasing their owner.