pub struct Selector {
pub metric: Option<String>,
pub labels: Vec<Label>,
pub range: Option<PromDuration>,
pub offset: Option<PromDuration>,
pub subquery: Option<Subquery>,
pub span: Option<Span>,
}
Expand description
A Selector that retrieves time series data from Prometheus
Fields§
§metric: Option<String>
§labels: Vec<Label>
§range: Option<PromDuration>
§offset: Option<PromDuration>
§subquery: Option<Subquery>
§span: Option<Span>
Implementations§
Source§impl Selector
impl Selector
pub fn new() -> Self
Sourcepub fn metric<S: Into<String>>(self, metric: S) -> Self
pub fn metric<S: Into<String>>(self, metric: S) -> Self
Sets or replaces this Selector’s metric
Sourcepub fn clear_metric(self) -> Self
pub fn clear_metric(self) -> Self
Clears this Selector’s metric
Sourcepub fn labels(self, labels: Vec<Label>) -> Self
pub fn labels(self, labels: Vec<Label>) -> Self
Replaces this Selector’s labels with the given set
Sourcepub fn clear_labels(self) -> Self
pub fn clear_labels(self) -> Self
Clears this Selector’s set of labels
Sourcepub fn range(self, range: PromDuration) -> Self
pub fn range(self, range: PromDuration) -> Self
Sets or replaces this Selector’s range
Sourcepub fn clear_range(self) -> Self
pub fn clear_range(self) -> Self
Clears this Selector’s range
Sourcepub fn offset(self, offset: PromDuration) -> Self
pub fn offset(self, offset: PromDuration) -> Self
Sets or replaces this Selector’s offset
pub fn clear_offset(self) -> Self
pub fn subquery(self, subquery: Subquery) -> Self
pub fn clear_subquery(self) -> Self
pub fn span<S: Into<Span>>(self, span: S) -> Self
pub fn wrap(self) -> Expression
pub fn return_value(&self) -> ReturnValue
Trait Implementations§
impl Eq for Selector
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnwindSafe for Selector
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