elasticsearch_dsl/search/aggregations/params/
aggregation_name.rs

1/// Aggregation name
2#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
3pub struct AggregationName(String);
4
5impl std::fmt::Debug for AggregationName {
6    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7        self.0.fmt(f)
8    }
9}
10
11impl<T> From<T> for AggregationName
12where
13    T: ToString,
14{
15    fn from(value: T) -> Self {
16        Self(value.to_string())
17    }
18}