write_line

Function write_line 

Source
pub fn write_line<R: Rng + ?Sized>(
    rng: &mut R,
    buf: &mut Vec<u8>,
    vibe: Vibe,
    limit_bytes: usize,
) -> Option<usize>
Expand description

Append one DogStatsD line of a sampled type to buf. When a line would exceed limit_bytes, drop it whole rather than shear it, leaving buf unchanged. A non-empty line always ends in \n.

Returns the packed value count when a multi-value metric was emitted, else None.