pub struct QueryRequest {
pub query: String,
pub time: Option<DateTime<Utc>>,
}Expand description
Query parameters for /api/v1/query prometheus request
Fields§
§query: StringThe PromQL query string
time: Option<DateTime<Utc>>Optional evaluation timestamp (defaults to current time)
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryRequest
impl Debug for QueryRequest
Source§impl PromRequest for QueryRequest
impl PromRequest for QueryRequest
Source§type Output<KV: Clone + Debug + DeserializeOwned> = PromData<KV>
type Output<KV: Clone + Debug + DeserializeOwned> = PromData<KV>
The output type returned by this request
Source§fn send<'life0, 'life1, 'async_trait, KV>(
&'life0 self,
host: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output<KV>, Error>> + Send + 'async_trait>>where
KV: Clone + Debug + DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait, KV>(
&'life0 self,
host: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output<KV>, Error>> + Send + 'async_trait>>where
KV: Clone + Debug + DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send the request to the given prometheus host URL
Source§fn send_with_client<'life0, 'life1, 'life2, 'async_trait, KV>(
&'life0 self,
client: &'life1 Client,
host: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output<KV>, Error>> + Send + 'async_trait>>where
KV: Clone + Debug + DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_with_client<'life0, 'life1, 'life2, 'async_trait, KV>(
&'life0 self,
client: &'life1 Client,
host: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Output<KV>, Error>> + Send + 'async_trait>>where
KV: Clone + Debug + DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send the request using the provided reqwest client
Auto Trait Implementations§
impl Freeze for QueryRequest
impl RefUnwindSafe for QueryRequest
impl Send for QueryRequest
impl Sync for QueryRequest
impl Unpin for QueryRequest
impl UnwindSafe for QueryRequest
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)