pub fn write_points(&mut self, pts: &[Point]) -> TelegrafResult {
        if pts.iter().any(|p| p.fields.is_empty()) {
            return Err(
                TelegrafError::BadProtocol("points must have at least 1 field".to_owned())
            );
        }

        let lp = pts.iter()
            .map(|p| p.to_lp().to_str().to_owned())
            .collect::<Vec<String>>()
            .join("");
        self.write_to_conn(lp.as_bytes())
    }
/// Joins multiple points together and writes them in a batch. Useful
/// if you want to write lots of points but not overwhelm local service or
/// you want to ensure all points have the exact same timestamp.
Joins multiple points together and writes them in a batch. Useful
if you want to write lots of points but not overwhelm local service or
you want to ensure all points have the exact same timestamp.
Joins multiple points together and writes them in a batch . Useful if you want to write lots of points but not overwhelm local service or you want to ensure all points have the exact same timestamp .
pub fn write_points(&mut self, pts: &[Point]) -> TelegrafResult {
        if pts.iter().any(|p| p.fields.is_empty()) {
            return Err(
                TelegrafError::BadProtocol("points must have at least 1 field".to_owned())
            );
        }
        let lp = pts.iter()
            .map(|p| p.to_lp().to_str().to_owned())
            .collect::<Vec<String>>()
            .join("");
        self.write_to_conn(lp.as_bytes())
    }
pub fn write_points ( & mut self , pts : & [ Point ] ) -> TelegrafResult { if pts . iter ( ) . any ( | p | p . fields . is_empty ( ) ) { return Err ( TelegrafError :: BadProtocol ( " " . to_owned ( ) ) ) ; } let lp = pts . iter ( ) . map ( | p | p . to_lp ( ) . to_str ( ) . to_owned ( ) ) . collect :: < Vec < String > > ( ) . join ( " " ) ; self . write_to_conn ( lp . as_bytes ( ) ) }
Joins multiple points together and writes them in a batch.
Joins multiple points together and writes them in a batch .
&mut self
pts
&[Point]