global: snapshot

This commit is contained in:
nym21
2026-01-12 16:19:23 +01:00
parent 1484eae53c
commit b675b70067
20 changed files with 11573 additions and 6489 deletions
@@ -38,6 +38,25 @@ impl BrkClient {{
pub fn metrics(&self) -> &MetricsTree {{
&self.metrics
}}
/// Create a dynamic metric endpoint builder for any metric/index combination.
///
/// Use this for programmatic access when the metric name is determined at runtime.
/// For type-safe access, use the `metrics()` tree instead.
///
/// # Example
/// ```ignore
/// let data = client.metric("realized_price", Index::Height)
/// .last(10)
/// .json::<f64>()?;
/// ```
pub fn metric(&self, metric: impl Into<Metric>, index: Index) -> MetricEndpointBuilder<serde_json::Value> {{
MetricEndpointBuilder::new(
self.base.clone(),
Arc::from(metric.into().as_str()),
index,
)
}}
"#,
VERSION = VERSION
)