[−][src]Struct ackorelic::DatastoreParamsBuilder
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
impl<'a> Sync for DatastoreParamsBuilder<'a>
impl<'a> Send for DatastoreParamsBuilder<'a>
impl<'a> Unpin for DatastoreParamsBuilder<'a>
impl<'a> RefUnwindSafe for DatastoreParamsBuilder<'a>
impl<'a> UnwindSafe for DatastoreParamsBuilder<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
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]
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel's query builder. Read more