use std::time::Duration;
use crate::{encoder::EncodeLabelSet, error::Result};
pub trait ExemplarEncoder {
fn encode(
&mut self,
label_set: &dyn EncodeLabelSet,
value: f64,
timestamp: Option<Duration>,
) -> Result<()>;
}
pub trait EncodeExemplar {
fn encode(&self, encoder: &mut dyn ExemplarEncoder) -> Result<()>;
}
impl EncodeExemplar for () {
fn encode(&self, _encoder: &mut dyn ExemplarEncoder) -> Result<()> {
Ok(())
}
}