pub struct Pivot {
pub dimension_filter_clauses: Option<Vec<DimensionFilterClause>>,
pub dimensions: Option<Vec<Dimension>>,
pub max_group_count: Option<i32>,
pub metrics: Option<Vec<Metric>>,
pub start_group: Option<i32>,
}
Expand description
The Pivot describes the pivot section in the request. The Pivot helps rearrange the information in the table for certain reports by pivoting your data on a second dimension.
This type is not used in any activity, and only used as part of another schema.
Fields§
§dimension_filter_clauses: Option<Vec<DimensionFilterClause>>
DimensionFilterClauses are logically combined with an AND
operator: only data that is included by all these DimensionFilterClauses contributes to the values in this pivot region. Dimension filters can be used to restrict the columns shown in the pivot region. For example if you have ga:browser
as the requested dimension in the pivot region, and you specify key filters to restrict ga:browser
to only “IE” or “Firefox”, then only those two browsers would show up as columns.
dimensions: Option<Vec<Dimension>>
A list of dimensions to show as pivot columns. A Pivot can have a maximum of 4 dimensions. Pivot dimensions are part of the restriction on the total number of dimensions allowed in the request.
max_group_count: Option<i32>
Specifies the maximum number of groups to return. The default value is 10, also the maximum value is 1,000.
metrics: Option<Vec<Metric>>
The pivot metrics. Pivot metrics are part of the restriction on total number of metrics allowed in the request.
start_group: Option<i32>
If k metrics were requested, then the response will contain some data-dependent multiple of k columns in the report. E.g., if you pivoted on the dimension ga:browser
then you’d get k columns for “Firefox”, k columns for “IE”, k columns for “Chrome”, etc. The ordering of the groups of columns is determined by descending order of “total” for the first of the k values. Ties are broken by lexicographic ordering of the first pivot dimension, then lexicographic ordering of the second pivot dimension, and so on. E.g., if the totals for the first value for Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns would be Chrome, Firefox, IE. The following let you choose which of the groups of k columns are included in the response.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pivot
impl<'de> Deserialize<'de> for Pivot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Part for Pivot
Auto Trait Implementations§
impl Freeze for Pivot
impl RefUnwindSafe for Pivot
impl Send for Pivot
impl Sync for Pivot
impl Unpin for Pivot
impl UnwindSafe for Pivot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more