pub struct Response {
    pub data: ResponseData,
    pub status: String,
}Expand description
A Prometheus Response returned by an HTTP query.
let full_response = hyper::body::Bytes::from(
   r#"
   { "status":"success",
     "data":{
       "resultType":"scalar",
       "result":[1558283674.829,"1"]
     }
   }"#,
 );
let res_json: Result<prometheus_http_api::Response, serde_json::Error> = serde_json::from_slice(&full_response);
assert!(res_json.is_ok());Fields§
§data: ResponseDataA Data response, it may be vector, matrix, scalar or String
status: StringAn status string, either "success" or "error"
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
 
impl<'de> Deserialize<'de> for Response
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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