Skip to main content

datadog_agent_apm/semantics/
accessor.rs

1//! Storage-independent access to typed attributes.
2
3/// An abstract view over a bag of typed attributes.
4pub trait Accessor {
5    /// Returns a string attribute, without converting other types.
6    fn get_string(&self, key: &str) -> Option<&str>;
7    /// Returns an integer attribute, without parsing strings.
8    fn get_int64(&self, key: &str) -> Option<i64>;
9    /// Returns a floating-point attribute, without parsing strings.
10    fn get_float64(&self, key: &str) -> Option<f64>;
11}