pub struct MetricsApi<'a> { /* private fields */ }Expand description
Metrics API façade.
Implementations§
Source§impl<'a> MetricsApi<'a>
impl<'a> MetricsApi<'a>
Sourcepub fn new(client: &'a DatadogClient) -> Self
pub fn new(client: &'a DatadogClient) -> Self
Wraps an existing DatadogClient for metrics operations.
Sourcepub async fn point_query(
&self,
query: &str,
from: i64,
to: i64,
) -> Result<MetricQueryResponse>
pub async fn point_query( &self, query: &str, from: i64, to: i64, ) -> Result<MetricQueryResponse>
Executes a point-in-time metrics timeseries query.
from / to are Unix epoch seconds — the unit expected by
Datadog’s v1 query parameters. The response from Datadog uses
milliseconds for its own from_date / to_date / pointlist
timestamps; we pass those through unmodified.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MetricsApi<'a>
impl<'a> !RefUnwindSafe for MetricsApi<'a>
impl<'a> Send for MetricsApi<'a>
impl<'a> Sync for MetricsApi<'a>
impl<'a> Unpin for MetricsApi<'a>
impl<'a> UnsafeUnpin for MetricsApi<'a>
impl<'a> !UnwindSafe for MetricsApi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more