Function vector::sinks::util::encoding::write_all

source ·
pub fn write_all(
    writer: &mut dyn Write,
    n_events_pending: usize,
    buf: &[u8],
) -> Result<()>
Expand description

Write the buffer to the writer. If the operation fails, emit an internal event which complies with the instrumentation spec- as this necessitates both an Error and EventsDropped event.

§Arguments

  • writer - The object implementing io::Write to write data to.
  • n_events_pending - The number of events that are dropped if this write fails.
  • buf - The buffer to write.