Struct grafana_plugin_sdk::data::QueryStat
source · [−]#[non_exhaustive]pub struct QueryStat {
pub field_config: FieldConfig,
pub value: ConfFloat64,
}
Expand description
Used for storing arbitrary statistics metadata related to a query and its results.
Examples include total request time and data processing time.
The field_config
field’s display_name
property MUST be set.
This corresponds to the QueryResultMetaStat
on the frontend.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.field_config: FieldConfig
Information used to identify the field to which this statistic applies.
value: ConfFloat64
The actual statistic.
Implementations
sourceimpl QueryStat
impl QueryStat
sourcepub fn new(field_config: FieldConfig, value: ConfFloat64) -> Self
pub fn new(field_config: FieldConfig, value: ConfFloat64) -> Self
Create a new QueryStat
for a field.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for QueryStat
impl<'de> Deserialize<'de> for QueryStat
sourcefn 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 QueryStat
Auto Trait Implementations
impl RefUnwindSafe for QueryStat
impl Send for QueryStat
impl Sync for QueryStat
impl Unpin for QueryStat
impl UnwindSafe for QueryStat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request