Trait opentelemetry_api::attributes::Encoder
source · pub trait Encoder: Debug {
// Required methods
fn encode(
&self,
attributes: &mut dyn Iterator<Item = (&Key, &Value)>
) -> String;
fn id(&self) -> EncoderId;
}
Expand description
Encoder is a mechanism for serializing an attribute set into a specific string representation that supports caching, to avoid repeated serialization. An example could be an exporter encoding the attribute set into a wire representation.