pub trait AttributeFactory {
type Attribute: Sized;
// Required methods
fn create_i64(&self, key: &'static str, value: i64) -> Self::Attribute;
fn create_f64(&self, key: &'static str, value: f64) -> Self::Attribute;
fn create_string(
&self,
key: &'static str,
value: Cow<'static, str>,
) -> Self::Attribute;
}Expand description
A trait for creating sampling attributes.
This trait abstracts the creation of attributes for sampling tags, allowing different implementations for different attribute types.
Required Associated Types§
Required Methods§
Sourcefn create_i64(&self, key: &'static str, value: i64) -> Self::Attribute
fn create_i64(&self, key: &'static str, value: i64) -> Self::Attribute
Creates an attribute with an i64 value.
Sourcefn create_f64(&self, key: &'static str, value: f64) -> Self::Attribute
fn create_f64(&self, key: &'static str, value: f64) -> Self::Attribute
Creates an attribute with an f64 value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".