Struct prometheus_http_query::RangeVector[][src]

pub struct RangeVector(pub String);
Expand description

An range vector expression that can be further operated on with functions/aggregations or passed to a Client in order to evaluate.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Convert a Selector to a RangeVector.

use prometheus_http_query::{Selector, RangeVector, Error};
use std::convert::TryInto;

fn main() -> Result<(), Error> {
    let v: Result<RangeVector, Error> = Selector::new()
        .metric("some_metric")?
        .range("1m30s")?
        .try_into();

    assert!(v.is_ok());

    Ok(())
}

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.