pub struct InfluxDbClient { /* private fields */ }
Expand description

Internal Representation of a Client

Implementations

Instantiates a new InfluxDbClient

Arguments
  • url: The URL where InfluxDB is running (ex. http://localhost:8086).
  • database: The Database against which queries and writes will be run.
Examples
use influxdb::client::InfluxDbClient;

let _client = InfluxDbClient::new("http://localhost:8086", "test");

Returns the name of the database the client is using

Returns the URL of the InfluxDB installation the client is using

Pings the InfluxDB Server

Returns a tuple of build type and version number

Sends a InfluxDbReadQuery or InfluxDbWriteQuery to the InfluxDB Server.InfluxDbError

A version capable of parsing the returned string is available under the serde_integration

Arguments
Examples
use influxdb::client::InfluxDbClient;
use influxdb::query::InfluxDbQuery;

let client = InfluxDbClient::new("http://localhost:8086", "test");
let _future = client.query(
    InfluxDbQuery::write_query("weather")
        .add_field("temperature", 82)
);

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.