#[non_exhaustive]pub enum MonitorQuery {
Metric(MetricQuery),
Search(SearchQuery),
ServiceCheck(CheckQuery),
Slo(SloQuery),
Composite(CompositeExpr),
Unparsed {
raw: String,
reason: String,
offset: usize,
},
}Expand description
A parsed Datadog monitor query, tagged by dialect.
The MonitorQuery::Unparsed variant is the graceful-degradation path: a
query the grammar does not yet model is preserved verbatim rather than
dropped, so a consumer can always render something.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Metric(MetricQuery)
time-agg(window): expr op threshold — the primary dialect.
Search(SearchQuery)
logs/events/rum/error-tracking search-source query.
ServiceCheck(CheckQuery)
"check".over(...).by(...).last(n).count_by_status().
Slo(SloQuery)
error_budget("<id>").over("7d") op n.
Composite(CompositeExpr)
Boolean tree of monitor-id references.
Unparsed
A query that could not be parsed; preserved verbatim with a reason.
Implementations§
Source§impl MonitorQuery
impl MonitorQuery
Sourcepub fn unparsed(raw: impl Into<String>, err: &ParseError) -> Self
pub fn unparsed(raw: impl Into<String>, err: &ParseError) -> Self
Build an MonitorQuery::Unparsed from a raw query and a ParseError.
Trait Implementations§
Source§impl Clone for MonitorQuery
impl Clone for MonitorQuery
Source§fn clone(&self) -> MonitorQuery
fn clone(&self) -> MonitorQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MonitorQuery
impl Debug for MonitorQuery
Source§impl<'de> Deserialize<'de> for MonitorQuery
impl<'de> Deserialize<'de> for MonitorQuery
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
Source§impl PartialEq for MonitorQuery
impl PartialEq for MonitorQuery
Source§fn eq(&self, other: &MonitorQuery) -> bool
fn eq(&self, other: &MonitorQuery) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MonitorQuery
impl Serialize for MonitorQuery
impl StructuralPartialEq for MonitorQuery
Auto Trait Implementations§
impl Freeze for MonitorQuery
impl RefUnwindSafe for MonitorQuery
impl Send for MonitorQuery
impl Sync for MonitorQuery
impl Unpin for MonitorQuery
impl UnsafeUnpin for MonitorQuery
impl UnwindSafe for MonitorQuery
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