pub struct QueryRequest {
pub metric: String,
pub query: String,
pub start: Option<Timestamp>,
pub end: Option<Timestamp>,
pub step_secs: u64,
}Expand description
A metrics query request.
Fields§
§metric: StringThe metric name (e.g., “cpu_usage”, “http_requests_total”).
query: StringThe PromQL query string (e.g., “sum(cpu_usage{env="prod"}) by (region)”).
start: Option<Timestamp>Start of the query time range (nanoseconds since epoch). If None, defaults to backend-specific behavior (e.g., 1 hour ago).
end: Option<Timestamp>End of the query time range (nanoseconds since epoch). If None, defaults to now.
step_secs: u64Query step/granularity in seconds. This determines the resolution of the returned data points.
Implementations§
Trait Implementations§
Source§impl Clone for QueryRequest
impl Clone for QueryRequest
Source§fn clone(&self) -> QueryRequest
fn clone(&self) -> QueryRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QueryRequest
impl RefUnwindSafe for QueryRequest
impl Send for QueryRequest
impl Sync for QueryRequest
impl Unpin for QueryRequest
impl UnsafeUnpin for QueryRequest
impl UnwindSafe for QueryRequest
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