pub fn write_all<ErrType, W: CustomWrite<ErrType>, ErrMaker: FnMut() -> Option<ErrType>>( writer: &mut W, buf: &[u8], error_to_return_if_zero_bytes_written: ErrMaker, ) -> Result<(), ErrType>