[][src]Struct google_analyticsreporting4::Metric

pub struct Metric {
    pub alias: Option<String>,
    pub expression: Option<String>,
    pub formatting_type: Option<String>,
}

Metrics are the quantitative measurements. For example, the metric ga:users indicates the total number of users for the requested time period.

This type is not used in any activity, and only used as part of another schema.

Fields

alias: Option<String>

An alias for the metric expression is an alternate name for the expression. The alias can be used for filtering and sorting. This field is optional and is useful if the expression is not a single metric but a complex expression which cannot be used in filtering and sorting. The alias is also used in the response column header.

expression: Option<String>

A metric expression in the request. An expression is constructed from one or more metrics and numbers. Accepted operators include: Plus (+), Minus (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, Positive cardinal numbers (0-9), can include decimals and is limited to 1024 characters. Example ga:totalRefunds/ga:users, in most cases the metric expression is just a single metric name like ga:users. Adding mixed MetricType (E.g., CURRENCY + PERCENTAGE) metrics will result in unexpected results.

formatting_type: Option<String>

Specifies how the metric expression should be formatted, for example INTEGER.

Trait Implementations

impl Clone for Metric[src]

impl Debug for Metric[src]

impl Default for Metric[src]

impl<'de> Deserialize<'de> for Metric[src]

impl Part for Metric[src]

impl Serialize for Metric[src]

Auto Trait Implementations

impl RefUnwindSafe for Metric

impl Send for Metric

impl Sync for Metric

impl Unpin for Metric

impl UnwindSafe for Metric

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> Typeable for T where
    T: Any