pub struct Query {
pub id: i32,
pub state: i32,
pub publisher_name: String,
pub plugin_name: String,
pub query_name: String,
pub key: Vec<String>,
pub output: Vec<String>,
pub concern: Vec<String>,
pub split: bool,
}Fields§
§id: i32The ID of the request, used to associate requests and replies.
Odd numbers = initiated by hc.
Even numbers = initiated by a plugin.
state: i32The state of the query, indicating if this is a request or a reply, and if it’s a reply whether it’s the end of the reply.
publisher_name: StringPublisher name and plugin name, when sent from Hipcheck to a plugin to initiate a fresh query, are used by the receiving plugin to validate that the query was intended for them.
When a plugin is making a query to another plugin through Hipcheck, it’s used to indicate the destination plugin, and to indicate the plugin that is replying when Hipcheck sends back the reply.
plugin_name: String§query_name: StringThe name of the query being made, so the responding plugin knows what to do with the provided data.
key: Vec<String>The key for the query, as a JSON object. This is the data that Hipcheck’s incremental computation system will use to cache the response.
output: Vec<String>The response for the query, as a JSON object. This will be cached by Hipcheck for future queries matching the publisher name, plugin name, query name, and key.
concern: Vec<String>An unstructured concern raised during the query that will be raised in the final Hipcheck report.
split: boolUsed to indicate whether or not a string field present in a repeated string field
was split between two messages
Implementations§
Source§impl Query
impl Query
Sourcepub fn state(&self) -> QueryState
pub fn state(&self) -> QueryState
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: QueryState)
pub fn set_state(&mut self, value: QueryState)
Sets state to the provided enum value.
Trait Implementations§
Source§impl Message for Query
impl Message for Query
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request