[][src]Struct ackorelic::DatastoreParamsBuilder

pub struct DatastoreParamsBuilder<'a> { /* fields omitted */ }

Builder for parameters used to instrument datastore segments.

Methods

impl<'a> DatastoreParamsBuilder<'a>[src]

pub fn new(product: Datastore) -> Self[src]

Begin creating a new set of datastore parameters.

pub fn collection(self, collection: &'a str) -> Self[src]

Set the table or collection being used or queried against.

Must not contain any slash characters.

pub fn operation(self, operation: &'a str) -> Self[src]

Set the operation being performed.

For example, "select" for a SQL SELECT query, or "set" for a Memcached set operation. While operations may be specified with any case, New Relic suggests using lowercase.

Must not contain any slash characters.

pub fn host(self, host: &'a str) -> Self[src]

Set the datastore host name.

Must not contain any slash characters.

pub fn port_path_or_id(self, port_path_or_id: &'a str) -> Self[src]

Set the port or socket used to connect to the datastore.

pub fn database_name(self, database_name: &'a str) -> Self[src]

Set the database name or number in use.

pub fn query(self, query: &'a str) -> Self[src]

Set the database query that was sent to the datastore.

For security reasons, this value is only used if you set the product to a supported sql-like datastore (Datastore::Firebird, Datastore::MySQL, Datastore::Postgres, etc.) This allows the SDK to correctly obfuscate the query. When the product is set otherwise, no query information is reported to New Relic.

pub fn build(self) -> Result<DatastoreParams>[src]

Consume the builder, returning the set of datastore parameters.

This will fail if any of the parameters contain null bytes.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> IntoSql for T[src]

fn into_sql<T>(self) -> Self::Expression where
    Self: AsExpression<T>, 
[src]

Convert self to an expression for Diesel's query builder. Read more

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
    &'a Self: AsExpression<T>, 
[src]

Convert &self to an expression for Diesel's query builder. Read more