Trait WriteDataPoint

Source
pub trait WriteDataPoint {
    // Required method
    fn write_data_point_to<W>(&self, w: W) -> Result<()>
       where W: Write;
}
Expand description

Transform a type into valid line protocol lines

This trait is to enable the conversion of DataPoints to line protocol; it is unlikely that you would need to implement this trait. In the future, a derive crate may exist that would facilitate the generation of implementations of this trait on custom types to help uphold the responsibilities for escaping and producing complete lines.

Required Methods§

Source

fn write_data_point_to<W>(&self, w: W) -> Result<()>
where W: Write,

Write this data point as line protocol. The implementor is responsible for properly escaping the data and ensuring that complete lines are generated.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§